@ued_fpi/data-visual 1.4.9 → 1.4.10
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, Fragment, renderList, unref, createElementVNode, toDisplayString } from 'vue';
|
|
2
2
|
import requestControl from '../../service/request.mjs';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "dv-ipes-basic-security-info" };
|
|
@@ -11,24 +11,37 @@ const __default__ = {
|
|
|
11
11
|
};
|
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
13
|
...__default__,
|
|
14
|
+
props: {
|
|
15
|
+
url: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "/ipes-srip-server/api/v3/gis/panel/company-base/safety-statistics"
|
|
18
|
+
},
|
|
19
|
+
basicInfoList: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => {
|
|
22
|
+
return [
|
|
23
|
+
{ title: "两重点一重大", key: "chemicalCompanyCount", unit: "家" },
|
|
24
|
+
{ title: "危险化学品", key: "chemicalCount", unit: "种" },
|
|
25
|
+
{ title: "危险化工工艺", key: "chemicalCraftCount", unit: "个" },
|
|
26
|
+
{ title: "重大危险源", key: "hazardCount", unit: "个" }
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
14
31
|
setup(__props) {
|
|
32
|
+
const props = __props;
|
|
15
33
|
const basicInfoData = ref({
|
|
16
34
|
chemicalCompanyCount: 0,
|
|
17
35
|
chemicalCount: 0,
|
|
18
36
|
chemicalCraftCount: 0,
|
|
19
37
|
hazardCount: 0
|
|
20
38
|
});
|
|
21
|
-
const basicInfos =
|
|
22
|
-
{ title: "危化品企业", key: "chemicalCompanyCount", unit: "家" },
|
|
23
|
-
{ title: "危险化学品", key: "chemicalCount", unit: "种" },
|
|
24
|
-
{ title: "危险化工工艺", key: "chemicalCraftCount", unit: "个" },
|
|
25
|
-
{ title: "重大危险源", key: "hazardCount", unit: "个" }
|
|
26
|
-
]);
|
|
39
|
+
const basicInfos = computed(() => props.basicInfoList);
|
|
27
40
|
async function getBasicInfoData() {
|
|
28
41
|
try {
|
|
29
42
|
const res = await requestControl({
|
|
30
43
|
method: "get",
|
|
31
|
-
url:
|
|
44
|
+
url: props.url
|
|
32
45
|
});
|
|
33
46
|
basicInfoData.value = res.data;
|
|
34
47
|
} catch (error) {
|
|
@@ -40,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
53
|
});
|
|
41
54
|
return (_ctx, _cache) => {
|
|
42
55
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
43
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(basicInfos
|
|
56
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(basicInfos), (item) => {
|
|
44
57
|
return openBlock(), createElementBlock("div", {
|
|
45
58
|
key: item.key,
|
|
46
59
|
class: "info-box"
|