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