@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.
@@ -26,7 +26,7 @@ const _hoisted_3 = { class: "box" };
26
26
  const _hoisted_4 = ["src"];
27
27
  const _hoisted_5 = { class: "info" };
28
28
  const _hoisted_6 = { class: "type" };
29
- const _hoisted_7 = { class: "bottom" };
29
+ const _hoisted_7 = ["onClick"];
30
30
  const _hoisted_8 = { class: "name" };
31
31
  const _hoisted_9 = { class: "phone" };
32
32
  const _hoisted_10 = { class: "done-header" };
@@ -54,7 +54,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
54
54
  default: "/duty-system-server/duty/web/api/v1/work/getDutyKeeper"
55
55
  }
56
56
  },
57
- setup(__props) {
57
+ emits: {
58
+ callPhone: (value) => value
59
+ },
60
+ setup(__props, { emit: emits }) {
58
61
  const props = __props;
59
62
  const { isDark } = utils.useThemeHook();
60
63
  const doneRate = vue.computed(() => props.doneRate);
@@ -91,6 +94,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
91
94
  getCommitmentData();
92
95
  });
93
96
  hooks.setIntervalData(getCommitmentData, 5 * 60 * 1e3);
97
+ function handleCallPhone(phone) {
98
+ emits("callPhone", phone);
99
+ }
94
100
  return (_ctx, _cache) => {
95
101
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
96
102
  _hoisted_2,
@@ -112,10 +118,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
112
118
  }, null, 8, _hoisted_4),
113
119
  vue.createElementVNode("div", _hoisted_5, [
114
120
  vue.createElementVNode("div", _hoisted_6, vue.toDisplayString(item.job), 1),
115
- vue.createElementVNode("div", _hoisted_7, [
121
+ vue.createElementVNode("div", {
122
+ class: "bottom",
123
+ onClick: ($event) => handleCallPhone(item.contactWay)
124
+ }, [
116
125
  vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(item.name), 1),
117
126
  vue.createElementVNode("span", _hoisted_9, vue.toDisplayString(item.contactWay), 1)
118
- ])
127
+ ], 8, _hoisted_7)
119
128
  ])
120
129
  ])
121
130
  ]);
@@ -11,7 +11,7 @@ const _hoisted_2 = { class: "value" };
11
11
  const _hoisted_3 = { class: "title" };
12
12
  const _hoisted_4 = { class: "done" };
13
13
  const _hoisted_5 = { class: "done-header" };
14
- const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("span", null, "排查任务完成率", -1);
14
+ const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("span", null, "上周排查任务完成率", -1);
15
15
  const _hoisted_7 = { class: "doneRateNumber" };
16
16
  const _hoisted_8 = {
17
17
  key: 0,
@@ -26,9 +26,13 @@ const __default__ = {
26
26
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
27
  ...__default__,
28
28
  props: {
29
- doneRate: {
30
- type: Number,
31
- default: 78.9
29
+ url: {
30
+ type: String,
31
+ default: "/ipes-srip-server/api/v3/gis/panel/hidden-trouble"
32
+ },
33
+ url2: {
34
+ type: String,
35
+ default: "/ipes-srip-server/api/v3/gis/hidden-trouble/mission/statistics/percent"
32
36
  }
33
37
  },
34
38
  setup(__props) {
@@ -43,19 +47,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
47
  { title: "重大隐患", key: "major" },
44
48
  { title: "整改率", key: "ratio", unit: "%" }
45
49
  ]);
46
- const doneRate = vue.computed(() => props.doneRate);
47
- const componentBox = vue.ref(null);
50
+ const doneRate = vue.ref(null);
51
+ const componentBox = vue.ref("");
48
52
  const copies = vue.computed(() => {
49
53
  const offsetWidth = componentBox.value?.offsetWidth || 0;
50
54
  return offsetWidth > 0 ? (offsetWidth - 24 - 2) / 3 : 0;
51
55
  });
52
56
  async function getData() {
53
57
  try {
54
- const res = await request.default({
55
- method: "get",
56
- url: "/ipes-srip-server/api/v3/gis/panel/hidden-trouble"
57
- });
58
+ const [res, res1] = await Promise.all([
59
+ request.default({ url: props.url }),
60
+ request.default({ url: props.url2 })
61
+ ]);
58
62
  data.value = res.data;
63
+ doneRate.value = res1.data?.missionCompletedPercent || 0;
59
64
  } catch (error) {
60
65
  console.log(error);
61
66
  }