@ued_fpi/data-visual 1.4.19 → 1.4.21

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.
@@ -22,7 +22,7 @@ const _hoisted_3 = { class: "box" };
22
22
  const _hoisted_4 = ["src"];
23
23
  const _hoisted_5 = { class: "info" };
24
24
  const _hoisted_6 = { class: "type" };
25
- const _hoisted_7 = { class: "bottom" };
25
+ const _hoisted_7 = ["onClick"];
26
26
  const _hoisted_8 = { class: "name" };
27
27
  const _hoisted_9 = { class: "phone" };
28
28
  const _hoisted_10 = { class: "done-header" };
@@ -50,7 +50,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
50
  default: "/duty-system-server/duty/web/api/v1/work/getDutyKeeper"
51
51
  }
52
52
  },
53
- setup(__props) {
53
+ emits: {
54
+ callPhone: (value) => value
55
+ },
56
+ setup(__props, { emit: emits }) {
54
57
  const props = __props;
55
58
  const { isDark } = useThemeHook();
56
59
  const doneRate = computed(() => props.doneRate);
@@ -87,6 +90,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
90
  getCommitmentData();
88
91
  });
89
92
  setIntervalData(getCommitmentData, 5 * 60 * 1e3);
93
+ function handleCallPhone(phone) {
94
+ emits("callPhone", phone);
95
+ }
90
96
  return (_ctx, _cache) => {
91
97
  return openBlock(), createElementBlock("div", _hoisted_1, [
92
98
  _hoisted_2,
@@ -108,10 +114,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
114
  }, null, 8, _hoisted_4),
109
115
  createElementVNode("div", _hoisted_5, [
110
116
  createElementVNode("div", _hoisted_6, toDisplayString(item.job), 1),
111
- createElementVNode("div", _hoisted_7, [
117
+ createElementVNode("div", {
118
+ class: "bottom",
119
+ onClick: ($event) => handleCallPhone(item.contactWay)
120
+ }, [
112
121
  createElementVNode("span", _hoisted_8, toDisplayString(item.name), 1),
113
122
  createElementVNode("span", _hoisted_9, toDisplayString(item.contactWay), 1)
114
- ])
123
+ ], 8, _hoisted_7)
115
124
  ])
116
125
  ])
117
126
  ]);
@@ -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
  }