@ued_fpi/data-visual 1.4.3 → 1.4.5
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.
- package/dist/es/ipes/src/ClassifiedRegulation/index.vue.mjs +20 -13
- package/dist/es/ipes/src/DualPreventionMechanism/index.vue.mjs +37 -17
- package/dist/es/ipes/src/PersonnelLocation/index.vue.mjs +34 -24
- package/dist/es/ipes/src/StartStopMajorMaintenance/index.vue.mjs +18 -7
- package/dist/es/style.css +1 -1
- package/dist/lib/ipes/src/ClassifiedRegulation/index.vue.js +20 -13
- package/dist/lib/ipes/src/DualPreventionMechanism/index.vue.js +36 -16
- package/dist/lib/ipes/src/PersonnelLocation/index.vue.js +34 -24
- package/dist/lib/ipes/src/StartStopMajorMaintenance/index.vue.js +17 -6
- package/dist/lib/style.css +1 -1
- package/package.json +2 -2
|
@@ -15,15 +15,22 @@ const __default__ = {
|
|
|
15
15
|
};
|
|
16
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
17
|
...__default__,
|
|
18
|
+
props: {
|
|
19
|
+
url: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "/ipes-srip-server/api/v4/hazard-source/evaluate/gis/stat"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
18
24
|
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
19
26
|
const countData = ref({
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
control: 0,
|
|
28
|
+
focus: 0,
|
|
22
29
|
general: 0
|
|
23
30
|
});
|
|
24
31
|
const countPercent = ref({
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
controlPercent: 0,
|
|
33
|
+
focusPercent: 0,
|
|
27
34
|
generalPercent: 0
|
|
28
35
|
});
|
|
29
36
|
function getShowData(value) {
|
|
@@ -33,14 +40,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
40
|
try {
|
|
34
41
|
const res = await requestControl({
|
|
35
42
|
method: "get",
|
|
36
|
-
url:
|
|
43
|
+
url: props.url
|
|
37
44
|
});
|
|
38
|
-
const {
|
|
45
|
+
const { control, focus, general } = res.data;
|
|
39
46
|
countData.value = res.data || {};
|
|
40
|
-
const total =
|
|
47
|
+
const total = control + focus + general;
|
|
41
48
|
countPercent.value = {
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
controlPercent: total === 0 ? 0 : control / total * 100,
|
|
50
|
+
focusPercent: total === 0 ? 0 : focus / total * 100,
|
|
44
51
|
generalPercent: total === 0 ? 100 : general / total * 100
|
|
45
52
|
};
|
|
46
53
|
} catch (error) {
|
|
@@ -55,20 +62,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
62
|
createElementVNode("div", _hoisted_2, [
|
|
56
63
|
_hoisted_3,
|
|
57
64
|
createElementVNode("div", _hoisted_4, [
|
|
58
|
-
createElementVNode("span", null, toDisplayString(getShowData(countData.value.
|
|
65
|
+
createElementVNode("span", null, toDisplayString(getShowData(countData.value.control)) + "家 ", 1),
|
|
59
66
|
_hoisted_5,
|
|
60
|
-
createElementVNode("span", null, toDisplayString(getShowData(countData.value.
|
|
67
|
+
createElementVNode("span", null, toDisplayString(getShowData(countData.value.focus)) + "家 ", 1),
|
|
61
68
|
_hoisted_6,
|
|
62
69
|
createElementVNode("span", null, toDisplayString(getShowData(countData.value.general)) + "家 ", 1)
|
|
63
70
|
])
|
|
64
71
|
]),
|
|
65
72
|
createElementVNode("div", _hoisted_7, [
|
|
66
73
|
createVNode(BarItem, {
|
|
67
|
-
percent: countPercent.value.
|
|
74
|
+
percent: countPercent.value.controlPercent,
|
|
68
75
|
"class-name": "red"
|
|
69
76
|
}, null, 8, ["percent"]),
|
|
70
77
|
createVNode(BarItem, {
|
|
71
|
-
percent: countPercent.value.
|
|
78
|
+
percent: countPercent.value.focusPercent,
|
|
72
79
|
"class-name": "yellow"
|
|
73
80
|
}, null, 8, ["percent"]),
|
|
74
81
|
createVNode(BarItem, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, normalizeStyle } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, normalizeStyle } from 'vue';
|
|
2
|
+
import requestControl from '../../service/request.mjs';
|
|
2
3
|
|
|
3
4
|
const _hoisted_1 = { class: "dv-ipes-dual-prevention-mechanism" };
|
|
4
5
|
const _hoisted_2 = { class: "name" };
|
|
@@ -9,33 +10,52 @@ const __default__ = {
|
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
...__default__,
|
|
11
12
|
props: {
|
|
12
|
-
|
|
13
|
-
type:
|
|
14
|
-
default: () =>
|
|
15
|
-
veryGood: null,
|
|
16
|
-
good: null,
|
|
17
|
-
medium: null,
|
|
18
|
-
bad: null,
|
|
19
|
-
unconstructed: null
|
|
20
|
-
})
|
|
13
|
+
dataList: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => ["excellentCount", "fineCount", "middlingCount", "badCount"]
|
|
21
16
|
}
|
|
22
17
|
},
|
|
23
18
|
setup(__props) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const data = ref({
|
|
21
|
+
excellentCount: null,
|
|
22
|
+
fineCount: null,
|
|
23
|
+
middlingCount: null,
|
|
24
|
+
badCount: null,
|
|
25
|
+
nodBuildCount: null
|
|
26
|
+
});
|
|
24
27
|
const levels = ref([
|
|
25
|
-
{ name: "优", key: "
|
|
26
|
-
{ name: "良", key: "
|
|
27
|
-
{ name: "中", key: "
|
|
28
|
-
{ name: "差", key: "
|
|
29
|
-
{ name: "未建设", key: "
|
|
28
|
+
{ name: "优", key: "excellentCount", color: "--dv-color-success" },
|
|
29
|
+
{ name: "良", key: "fineCount", color: "--dv-color-warning" },
|
|
30
|
+
{ name: "中", key: "middlingCount", color: "--dv-color-index" },
|
|
31
|
+
{ name: "差", key: "badCount", color: "--dv-color-danger" },
|
|
32
|
+
{ name: "未建设", key: "nodBuildCount", color: "--dv-color-text-primary" }
|
|
30
33
|
]);
|
|
34
|
+
const levelsView = computed(() => {
|
|
35
|
+
return levels.value.filter((item) => {
|
|
36
|
+
return props.dataList.includes(item.key);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
31
39
|
function getShowData(value) {
|
|
32
40
|
return value == null || isNaN(+value) ? "--" : value;
|
|
33
41
|
}
|
|
42
|
+
async function getData() {
|
|
43
|
+
try {
|
|
44
|
+
const res = await requestControl({
|
|
45
|
+
method: "get",
|
|
46
|
+
url: "/ipes-srip-server/api/v4/statistics/mechanism-operation"
|
|
47
|
+
});
|
|
48
|
+
data.value = res.data;
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.log(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
34
53
|
onMounted(() => {
|
|
54
|
+
getData();
|
|
35
55
|
});
|
|
36
56
|
return (_ctx, _cache) => {
|
|
37
57
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
38
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
58
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(levelsView.value, (item) => {
|
|
39
59
|
return openBlock(), createElementBlock("div", {
|
|
40
60
|
key: item.key,
|
|
41
61
|
class: "level-item"
|
|
@@ -44,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
64
|
createElementVNode("div", {
|
|
45
65
|
class: "value",
|
|
46
66
|
style: normalizeStyle({ color: `var(${item.color})` })
|
|
47
|
-
}, toDisplayString(getShowData(
|
|
67
|
+
}, toDisplayString(getShowData(data.value[item.key])), 5)
|
|
48
68
|
]);
|
|
49
69
|
}), 128))
|
|
50
70
|
]);
|
|
@@ -23,26 +23,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
const colors = ["var(--dv-color-danger)", "var(--dv-color-warning)", "var(--dv-color-index)", "var(--dv-color-success)"];
|
|
24
24
|
const totalCount = ref(0);
|
|
25
25
|
const legendData = ref([
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
26
|
+
// {
|
|
27
|
+
// name: '管委会',
|
|
28
|
+
// key: 'managePeopleNum',
|
|
29
|
+
// count: 0
|
|
30
|
+
// },
|
|
31
|
+
// {
|
|
32
|
+
// name: '企业',
|
|
33
|
+
// key: 'companyPeopleNum',
|
|
34
|
+
// count: 0
|
|
35
|
+
// },
|
|
36
|
+
// {
|
|
37
|
+
// name: '第三方',
|
|
38
|
+
// key: 'thirdPeopleNum',
|
|
39
|
+
// count: 0
|
|
40
|
+
// },
|
|
41
|
+
// {
|
|
42
|
+
// name: '访客',
|
|
43
|
+
// key: 'visitorNum',
|
|
44
|
+
// count: 0
|
|
45
|
+
// }
|
|
46
46
|
]);
|
|
47
47
|
const personnelChart = ref();
|
|
48
48
|
function drawChart(data) {
|
|
@@ -99,10 +99,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
99
|
url: "/ipes-pcip-server/api/v2/gis/stat-people-online"
|
|
100
100
|
});
|
|
101
101
|
const seriesData = [];
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
const dataList = data?.dataList || [
|
|
103
|
+
// {
|
|
104
|
+
// num: 200,
|
|
105
|
+
// name: '管委会'
|
|
106
|
+
// },
|
|
107
|
+
// {
|
|
108
|
+
// num: 100,
|
|
109
|
+
// name: '1管委会2'
|
|
110
|
+
// }
|
|
111
|
+
];
|
|
112
|
+
dataList.forEach((item) => {
|
|
113
|
+
seriesData.push([item.name, item.num || 0]);
|
|
105
114
|
});
|
|
115
|
+
legendData.value = dataList;
|
|
106
116
|
totalCount.value = data?.total || 0;
|
|
107
117
|
drawChart(seriesData);
|
|
108
118
|
} catch (error) {
|
|
@@ -140,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
150
|
style: normalizeStyle({ background: colors[index] })
|
|
141
151
|
}, null, 4),
|
|
142
152
|
createElementVNode("div", _hoisted_10, toDisplayString(item.name), 1),
|
|
143
|
-
createElementVNode("div", _hoisted_11, toDisplayString(item.
|
|
153
|
+
createElementVNode("div", _hoisted_11, toDisplayString(item.num || 0), 1)
|
|
144
154
|
]);
|
|
145
155
|
}), 128))
|
|
146
156
|
])
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
+
import requestControl from '../../service/request.mjs';
|
|
2
3
|
|
|
3
4
|
const _hoisted_1 = { class: "dv-ipes-start-stop-major-maintenance" };
|
|
4
5
|
const _hoisted_2 = { class: "title" };
|
|
@@ -13,15 +14,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
14
|
...__default__,
|
|
14
15
|
setup(__props) {
|
|
15
16
|
const basicInfoData = ref({
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
toDayCarCount: 0,
|
|
18
|
+
toDay0verhaulCount: 0
|
|
18
19
|
});
|
|
19
20
|
const basicInfos = ref([
|
|
20
|
-
{ title: "今日开停车", key: "
|
|
21
|
-
{ title: "今日大检修", key: "
|
|
21
|
+
{ title: "今日开停车", key: "toDayCarCount", unit: "个" },
|
|
22
|
+
{ title: "今日大检修", key: "toDay0verhaulCount", unit: "个" }
|
|
22
23
|
]);
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
async function getBasicInfo() {
|
|
25
|
+
try {
|
|
26
|
+
const res = await requestControl({
|
|
27
|
+
method: "get",
|
|
28
|
+
url: "/ipes-srip-server/api/v1/vehicle-statistical/car-today"
|
|
29
|
+
});
|
|
30
|
+
basicInfoData.value = res.data;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.log(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
getBasicInfo();
|
|
25
36
|
return (_ctx, _cache) => {
|
|
26
37
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
27
38
|
(openBlock(true), createElementBlock(Fragment, null, renderList(basicInfos.value, (item) => {
|