nxd-plugin 1.7.98 → 1.7.99

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.
Files changed (26) hide show
  1. package/dist/chunks/component-GridForecastMsg-B1CCDv2Y.mjs +203 -0
  2. package/dist/chunks/component-HdHeatService-UxyMUQp4.mjs +480 -0
  3. package/dist/chunks/{component-HdRisk-CEMlJ4At.mjs → component-HdRisk-tQq0onmA.mjs} +5 -5
  4. package/dist/chunks/{component-HdSeaCase-CeZO7ZaP.mjs → component-HdSeaCase-DoWAhrNy.mjs} +10 -112
  5. package/dist/chunks/{component-HdServiceRequirements-BJcVMUuk.mjs → component-HdServiceRequirements-S9zSof01.mjs} +2 -2
  6. package/dist/chunks/{component-HighQuality-sN-CJX4X.mjs → component-HighQuality-C_W_iOrU.mjs} +4 -4
  7. package/dist/chunks/{component-PrecipitationRanking-1knx18YC.mjs → component-PrecipitationRanking-BamBChop.mjs} +5 -5
  8. package/dist/chunks/{component-StationList-BszBJ914.mjs → component-StationList-CJ7XHlZl.mjs} +5 -9
  9. package/dist/components/GridForecastMsg/GridForecastMsg.vue.d.ts +24 -0
  10. package/dist/components/HdRisk/HdRisk.vue.d.ts +4 -4
  11. package/dist/components/HdSeaCase/HdSeaCase.vue.d.ts +0 -23
  12. package/dist/components/StationList/StationList.vue.d.ts +2 -2
  13. package/dist/index.d.ts +2 -1
  14. package/dist/nxd-plugin.mjs +10 -9
  15. package/dist/styles/component-GridForecastMsg.css +1 -0
  16. package/dist/styles/component-HdHeatService.css +1 -1
  17. package/dist/styles/component-HdRisk.css +1 -1
  18. package/dist/styles/component-HdSeaCase.css +1 -1
  19. package/dist/styles/component-HdServiceMarterial.css +1 -1
  20. package/dist/styles/component-HdServiceRequirements.css +1 -1
  21. package/dist/styles/component-HighQuality.css +1 -1
  22. package/dist/styles/component-PrecipitationRanking.css +1 -1
  23. package/dist/styles/component-StationList.css +1 -1
  24. package/dist/styles/component-YCLoginNew.css +1 -1
  25. package/package.json +1 -1
  26. package/dist/chunks/component-HdHeatService-D4WfN9td.mjs +0 -482
@@ -0,0 +1,203 @@
1
+ import { n as e } from "./component-AqiMonitor-DWhSDKFM.mjs";
2
+ import { r as t } from "./component-AiChat-B2YoRfzz.mjs";
3
+ import { ElCheckbox as n, ElInput as r, ElLoadingDirective as i } from "element-plus/es";
4
+ import { Fragment as a, computed as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, normalizeStyle as f, onBeforeUnmount as p, onMounted as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, vShow as y, withCtx as b, withDirectives as x, withModifiers as S } from "vue";
5
+ import "element-plus/es/components/loading/style/css";
6
+ import "element-plus/es/components/checkbox/style/css";
7
+ import { ElMessage as C } from "element-plus";
8
+ import "element-plus/es/components/message/style/css";
9
+ import "element-plus/es/components/input/style/css";
10
+ //#region src/components/GridForecastMsg/GridForecastMsg.vue?vue&type=script&setup=true&lang.ts
11
+ var w = { class: "GridForecastMsg-head" }, T = { class: "GridForecastMsg-body" }, E = { class: "GridForecastMsg-forecast" }, D = { class: "GridForecastMsg-forecast__list" }, O = { class: "GridForecastMsg-forecast__name" }, k = { class: "GridForecastMsg-forecast__value" }, A = { class: "GridForecastMsg-edit" }, j = { class: "GridForecastMsg-edit__checks" }, M = /* @__PURE__ */ e(/* @__PURE__ */ u({
12
+ __name: "GridForecastMsg",
13
+ props: {
14
+ appKey: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ appSalt: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ baseHttp: {
23
+ type: String,
24
+ default: ""
25
+ },
26
+ ids: {
27
+ type: Object,
28
+ default: () => ({})
29
+ }
30
+ },
31
+ setup(e, { emit: u }) {
32
+ let M = d()?.appContext.config.globalProperties.$bus, N = e, P = g(!1), F = g(!0), I = g(""), L = g(""), R = g(""), z = g(!0), B = g(!1), V = g({}), H = g([]), U = g(!1), W = g({
33
+ x: 0,
34
+ y: 0
35
+ }), G = g({
36
+ x: 0,
37
+ y: 0
38
+ }), K = o(() => ({
39
+ transform: `translate(${G.value.x}px, ${G.value.y}px)`,
40
+ transition: U.value ? "none" : "transform 0.1s"
41
+ }));
42
+ m(() => {
43
+ M?.on("toComponent", (e) => {
44
+ e.componentName === "GridForecastMsg" && (e.value = e, q());
45
+ });
46
+ });
47
+ let q = async () => {
48
+ F.value = !0, P.value = !0;
49
+ let e = {
50
+ appKey: N.appKey,
51
+ appSalt: N.appSalt,
52
+ id: N.ids.weather.id,
53
+ variables: { index: V.value.index },
54
+ baseHttp: N.baseHttp,
55
+ reqType: N.ids.weather.reqType,
56
+ isFormData: N.ids.weather.isFormData
57
+ }, n = null;
58
+ try {
59
+ n = await t(e);
60
+ } catch (e) {
61
+ console.error(e);
62
+ } finally {
63
+ P.value = !1;
64
+ }
65
+ H.value = n && n.data.result.output || [];
66
+ }, J = async () => {
67
+ if (!z.value && !B.value) {
68
+ C.warning("请至少选择一种发送方式(闪信或北斗报文)");
69
+ return;
70
+ }
71
+ if (!I.value.trim()) {
72
+ C.warning("请输入发布时间");
73
+ return;
74
+ }
75
+ if (!L.value.trim()) {
76
+ C.warning("请输入发布内容");
77
+ return;
78
+ }
79
+ if (!R.value.trim()) {
80
+ C.warning("请输入电话号码");
81
+ return;
82
+ }
83
+ P.value = !0;
84
+ let e = {
85
+ appKey: N.appKey,
86
+ appSalt: N.appSalt,
87
+ id: N.ids.send.id,
88
+ variables: {
89
+ serviceTypeID: "46",
90
+ mobiles: R.value,
91
+ flashMessage: `【青岛市黄岛区气象局】来电提醒:${I.value}发布${L.value}`
92
+ },
93
+ baseHttp: N.baseHttp,
94
+ reqType: N.ids.send.reqType,
95
+ isFormData: N.ids.send.isFormData
96
+ }, n = null;
97
+ try {
98
+ n = await t(e);
99
+ } catch (e) {
100
+ console.error(e);
101
+ } finally {
102
+ P.value = !1;
103
+ }
104
+ n && n.data.result.output.msg === "发送成功" ? C.success("发送成功") : C.error("发送失败");
105
+ }, Y = (e) => {
106
+ e.target.classList.contains("GridForecastMsg-head__close") || (U.value = !0, W.value = {
107
+ x: e.clientX - G.value.x,
108
+ y: e.clientY - G.value.y
109
+ }, document.addEventListener("mousemove", X), document.addEventListener("mouseup", Z));
110
+ }, X = (e) => {
111
+ U.value && (G.value = {
112
+ x: e.clientX - W.value.x,
113
+ y: e.clientY - W.value.y
114
+ });
115
+ }, Z = () => {
116
+ U.value = !1, document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", Z);
117
+ };
118
+ p(() => {
119
+ document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", Z);
120
+ });
121
+ let Q = () => {
122
+ F.value = !1;
123
+ };
124
+ return (e, t) => {
125
+ let o = n, u = r, d = i;
126
+ return x((h(), s("div", {
127
+ class: "GridForecastMsg",
128
+ style: f(K.value),
129
+ "element-loading-background": "rgba(0, 0, 0, 0.4)"
130
+ }, [
131
+ t[15] ||= c("span", { class: "GridForecastMsg__corner GridForecastMsg__corner--tl" }, null, -1),
132
+ t[16] ||= c("span", { class: "GridForecastMsg__corner GridForecastMsg__corner--tr" }, null, -1),
133
+ t[17] ||= c("span", { class: "GridForecastMsg__corner GridForecastMsg__corner--bl" }, null, -1),
134
+ t[18] ||= c("span", { class: "GridForecastMsg__corner GridForecastMsg__corner--br" }, null, -1),
135
+ c("div", w, [c("div", {
136
+ class: "GridForecastMsg-head__top",
137
+ onMousedown: Y
138
+ }, [t[5] ||= c("div", { class: "GridForecastMsg-head__title" }, "网格预报", -1), c("div", {
139
+ class: "GridForecastMsg-head__close",
140
+ onClick: S(Q, ["stop"]),
141
+ title: "关闭"
142
+ }, "X")], 32), t[6] ||= c("div", { class: "GridForecastMsg-head__line" }, null, -1)]),
143
+ c("div", T, [
144
+ c("div", E, [t[7] ||= c("div", { class: "GridForecastMsg-forecast__title" }, "三天预报", -1), c("div", D, [(h(!0), s(a, null, _(H.value, (e) => (h(), s("div", {
145
+ class: "GridForecastMsg-forecast__item",
146
+ key: e.id
147
+ }, [c("div", O, v(e.hour) + "小时预报", 1), c("div", k, " 阵风" + v(e.windSpeedMinGrade == e.windSpeedMaxGrade ? e.windSpeedMinGrade : e.windSpeedMinGrade + "-" + e.windSpeedMaxGrade) + "级 ", 1)]))), 128))])]),
148
+ c("div", A, [
149
+ t[10] ||= c("div", { class: "GridForecastMsg-edit__title" }, "编辑信息", -1),
150
+ c("div", j, [l(o, {
151
+ modelValue: z.value,
152
+ "onUpdate:modelValue": t[0] ||= (e) => z.value = e
153
+ }, {
154
+ default: b(() => [...t[8] ||= [c("span", { class: "GridForecastMsg-edit__check-label" }, "闪信", -1)]]),
155
+ _: 1
156
+ }, 8, ["modelValue"]), l(o, {
157
+ modelValue: B.value,
158
+ "onUpdate:modelValue": t[1] ||= (e) => B.value = e
159
+ }, {
160
+ default: b(() => [...t[9] ||= [c("span", { class: "GridForecastMsg-edit__check-label" }, "北斗报文", -1)]]),
161
+ _: 1
162
+ }, 8, ["modelValue"])]),
163
+ t[11] ||= c("div", { class: "GridForecastMsg-edit__prefix" }, "【青岛市黄岛区气象局】来电提醒:", -1),
164
+ l(u, {
165
+ modelValue: I.value,
166
+ "onUpdate:modelValue": t[2] ||= (e) => I.value = e,
167
+ type: "textarea",
168
+ placeholder: "请输入发布时间",
169
+ rows: "1",
170
+ maxlength: "9",
171
+ "show-word-limit": ""
172
+ }, null, 8, ["modelValue"]),
173
+ t[12] ||= c("div", { class: "GridForecastMsg-edit__label" }, "发布", -1),
174
+ l(u, {
175
+ modelValue: L.value,
176
+ "onUpdate:modelValue": t[3] ||= (e) => L.value = e,
177
+ type: "textarea",
178
+ placeholder: "请输入发布内容",
179
+ rows: "1",
180
+ maxlength: "40",
181
+ "show-word-limit": ""
182
+ }, null, 8, ["modelValue"]),
183
+ t[13] ||= c("div", { class: "GridForecastMsg-edit__label" }, "电话号码", -1),
184
+ l(u, {
185
+ modelValue: R.value,
186
+ "onUpdate:modelValue": t[4] ||= (e) => R.value = e,
187
+ type: "textarea",
188
+ placeholder: "请输入电话号码",
189
+ rows: "1"
190
+ }, null, 8, ["modelValue"]),
191
+ t[14] ||= c("div", { class: "GridForecastMsg-edit__hint" }, "多个号码以英文逗号(,)间隔,如123,123,123", -1)
192
+ ]),
193
+ c("button", {
194
+ class: "GridForecastMsg-submit",
195
+ onClick: J
196
+ }, "发送")
197
+ ])
198
+ ], 4)), [[y, F.value], [d, P.value]]);
199
+ };
200
+ }
201
+ }), [["__scopeId", "data-v-14f101b1"]]);
202
+ //#endregion
203
+ export { M as t };
@@ -0,0 +1,480 @@
1
+ import { n as e } from "./component-AqiMonitor-DWhSDKFM.mjs";
2
+ import { r as t } from "./component-AiChat-B2YoRfzz.mjs";
3
+ import { ElLoadingDirective as n } from "element-plus/es";
4
+ import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, getCurrentInstance as ee, nextTick as u, normalizeStyle as d, onMounted as te, onUnmounted as ne, openBlock as f, ref as p, renderList as m, toDisplayString as h, watch as g, withDirectives as re } from "vue";
5
+ import * as _ from "echarts";
6
+ //#region src/components/HdHeatService/HdHeatService.vue?vue&type=script&setup=true&lang.ts
7
+ var ie = { class: "HdHeatService" }, ae = {
8
+ key: 0,
9
+ class: "HdHeatService-card"
10
+ }, oe = {
11
+ key: 0,
12
+ class: "HdHeatService-banner"
13
+ }, se = ["src"], ce = { class: "HdHeatService-content" }, le = { class: "HdHeatService-stats" }, ue = { class: "HdHeatService-stat" }, de = { class: "HdHeatService-statLabel" }, fe = { class: "HdHeatService-statValue" }, pe = {
14
+ key: 0,
15
+ class: "HdHeatService-statUnit"
16
+ }, me = { class: "HdHeatService-stat" }, he = { class: "HdHeatService-statLabel" }, ge = { class: "HdHeatService-statValue" }, _e = {
17
+ key: 0,
18
+ class: "HdHeatService-statUnit"
19
+ }, ve = {
20
+ key: 1,
21
+ class: "HdHeatService-time"
22
+ }, ye = {
23
+ key: 1,
24
+ class: "HdHeatService-card"
25
+ }, be = {
26
+ key: 0,
27
+ class: "HdHeatService-banner"
28
+ }, xe = ["src"], Se = { class: "HdHeatService-content" }, Ce = { class: "HdHeatService-stats" }, v = { class: "HdHeatService-stat" }, y = { class: "HdHeatService-statLabel" }, b = {
29
+ class: "HdHeatService-statValue",
30
+ style: {
31
+ "font-weight": "400",
32
+ "font-size": "14px"
33
+ }
34
+ }, x = { class: "HdHeatService-stat" }, S = { class: "HdHeatService-statLabel" }, C = {
35
+ class: "HdHeatService-statValue",
36
+ style: {
37
+ "font-weight": "400",
38
+ "font-size": "14px"
39
+ }
40
+ }, w = {
41
+ key: 2,
42
+ class: "HdHeatService-card"
43
+ }, T = {
44
+ key: 0,
45
+ class: "HdHeatService-banner"
46
+ }, E = ["src"], D = { class: "HdHeatService-content" }, O = { class: "HdHeatService-stats" }, k = { class: "HdHeatService-stat" }, A = { class: "HdHeatService-statLabel" }, we = {
47
+ class: "HdHeatService-statValue",
48
+ style: {
49
+ "font-weight": "400",
50
+ "font-size": "14px"
51
+ }
52
+ }, Te = { class: "HdHeatService-stat" }, Ee = { class: "HdHeatService-statLabel" }, De = {
53
+ class: "HdHeatService-statValue",
54
+ style: {
55
+ "font-weight": "400",
56
+ "font-size": "14px"
57
+ }
58
+ }, Oe = {
59
+ key: 3,
60
+ "element-loading-text": "加载中...",
61
+ "element-loading-background": "rgba(0, 0, 0, 0.7)",
62
+ class: "HdHeatService-effectMask"
63
+ }, ke = { class: "HdHeatService-effectPanel" }, Ae = { class: "HdHeatService-effectHeader" }, je = { class: "HdHeatService-effectTitle" }, Me = {
64
+ key: 0,
65
+ class: "HdHeatService-effectSummary"
66
+ }, Ne = { class: "HdHeatService-effectSummaryLabel" }, Pe = {
67
+ key: 0,
68
+ class: "HdHeatService-effectSummaryUnit"
69
+ }, Fe = { class: "HdHeatService-effectChartTitle" }, j = /* @__PURE__ */ e(/* @__PURE__ */ l({
70
+ __name: "HdHeatService",
71
+ props: {
72
+ pageType: { default: "1" },
73
+ baseHttp: { default: "" },
74
+ appKey: { default: "" },
75
+ appSalt: { default: "" },
76
+ ids: { default: () => ({}) },
77
+ bgImage: { default: "" },
78
+ deviceCount: { default: 15 },
79
+ materialCount: { default: 100 },
80
+ serviceTime: { default: "2026年08月13日" },
81
+ effectTitle: { default: "服务成效" },
82
+ effectSummary: { default: () => [] },
83
+ effectCharts: { default: () => [] },
84
+ imgKey: { default: "" },
85
+ imgBaseUrl: { default: "" },
86
+ serviceType: { default: "" }
87
+ },
88
+ emits: ["close"],
89
+ setup(e, { emit: l }) {
90
+ let j = ee()?.appContext.config.globalProperties.$bus, M = e, Ie = l, N = p({
91
+ bgImage: "",
92
+ deviceCount: 0,
93
+ materialCount: 0,
94
+ serviceTime: "",
95
+ effectTitle: "",
96
+ effectSummary: [],
97
+ effectCharts: []
98
+ }), P = p(!1), F = p({}), I = p({}), L = p({
99
+ deviceData: "",
100
+ serviceCount: 0,
101
+ monitorCount: 0
102
+ }), R = p({
103
+ stationNum: 0,
104
+ serviceNum: 0
105
+ }), z = i(() => M.pageType === "1" ? {
106
+ deviceLabel: "供热气象观测设备",
107
+ materialLabel: "供热气象服务材料",
108
+ timePrefix: "服务时间:截止",
109
+ showEffect: !0
110
+ } : M.pageType === "2" ? {
111
+ deviceLabel: "观测设备(个)",
112
+ materialLabel: "服务次数(次)",
113
+ timePrefix: "",
114
+ showEffect: !1
115
+ } : {
116
+ deviceLabel: "实景监测(个)",
117
+ materialLabel: "服务次数(次)",
118
+ timePrefix: "",
119
+ showEffect: !0
120
+ }), B = p(!1), V = i(() => N.value.bgImage || M.bgImage), Le = i(() => M.serviceTime || N.value.serviceTime || ""), Re = i(() => M.effectTitle || N.value.effectTitle || "服务成效"), H = i(() => M.effectSummary.length ? M.effectSummary : N.value.effectSummary), U = i(() => M.effectCharts.length ? M.effectCharts : N.value.effectCharts), ze = i(() => ({ gridTemplateColumns: `repeat(${U.value.length || 1}, 1fr)` })), Be = (e, t) => {
121
+ e && (F.value[t] = e);
122
+ }, Ve = (e) => {
123
+ let t = e.data.map((e) => e.x), n = e.data.map((e) => e.y), r = e.color || "#5B7CF2", i = {
124
+ data: n,
125
+ itemStyle: { color: r },
126
+ label: {
127
+ show: e.showLabel !== !1,
128
+ position: "top",
129
+ color: "#fff",
130
+ fontSize: 12
131
+ }
132
+ }, a;
133
+ if (e.type === "bar") a = {
134
+ ...i,
135
+ type: "bar",
136
+ barWidth: e.barWidth || "40%"
137
+ };
138
+ else if (e.type === "area") a = {
139
+ ...i,
140
+ type: "line",
141
+ smooth: !0,
142
+ areaStyle: { color: new _.graphic.LinearGradient(0, 0, 0, 1, [{
143
+ offset: 0,
144
+ color: r
145
+ }, {
146
+ offset: 1,
147
+ color: "rgba(91, 124, 242, 0.1)"
148
+ }]) },
149
+ lineStyle: {
150
+ width: 2,
151
+ color: r
152
+ },
153
+ symbol: "circle",
154
+ symbolSize: 6
155
+ };
156
+ else if (e.type === "pie") return {
157
+ backgroundColor: "transparent",
158
+ tooltip: {
159
+ trigger: "item",
160
+ backgroundColor: "rgba(6, 32, 56, 0.95)",
161
+ borderColor: "rgba(64, 158, 255, 0.4)",
162
+ textStyle: { color: "#fff" }
163
+ },
164
+ series: [{
165
+ type: "pie",
166
+ radius: ["40%", "70%"],
167
+ data: e.data.map((e) => ({
168
+ name: e.x,
169
+ value: e.y
170
+ })),
171
+ label: {
172
+ color: "#fff",
173
+ fontSize: 12
174
+ },
175
+ itemStyle: {
176
+ borderRadius: 4,
177
+ borderColor: "rgba(4, 18, 38, 0.96)",
178
+ borderWidth: 2
179
+ }
180
+ }]
181
+ };
182
+ else a = {
183
+ ...i,
184
+ type: "line",
185
+ smooth: !0,
186
+ lineStyle: {
187
+ width: 2,
188
+ color: r
189
+ },
190
+ symbol: "circle",
191
+ symbolSize: 6
192
+ };
193
+ return {
194
+ backgroundColor: "transparent",
195
+ grid: {
196
+ top: 32,
197
+ right: 16,
198
+ bottom: 24,
199
+ left: 48
200
+ },
201
+ tooltip: {
202
+ trigger: "axis",
203
+ backgroundColor: "rgba(6, 32, 56, 0.95)",
204
+ borderColor: "rgba(64, 158, 255, 0.4)",
205
+ textStyle: { color: "#fff" },
206
+ formatter: (t) => {
207
+ let n = Array.isArray(t) ? t[0] : t;
208
+ return `${n.name}<br/>${n.value}${e.yAxisName || ""}`;
209
+ }
210
+ },
211
+ xAxis: {
212
+ type: "category",
213
+ data: t,
214
+ axisLine: { lineStyle: { color: "rgba(255,255,255,0.3)" } },
215
+ axisLabel: {
216
+ color: "rgba(255,255,255,0.85)",
217
+ fontSize: 12
218
+ },
219
+ axisTick: { show: !1 },
220
+ splitLine: { show: !1 }
221
+ },
222
+ yAxis: {
223
+ type: "value",
224
+ name: e.yAxisName || "",
225
+ nameTextStyle: {
226
+ color: "rgba(255,255,255,0.7)",
227
+ fontSize: 11
228
+ },
229
+ axisLine: { show: !1 },
230
+ axisLabel: {
231
+ color: "rgba(255,255,255,0.7)",
232
+ fontSize: 11
233
+ },
234
+ splitLine: { show: !1 },
235
+ axisTick: { show: !1 }
236
+ },
237
+ series: [a]
238
+ };
239
+ }, W = () => {
240
+ U.value.forEach((e, t) => {
241
+ let n = F.value[t];
242
+ if (!n) return;
243
+ let r = I.value[t];
244
+ (!r || r.isDisposed()) && (r = _.init(n, void 0, { renderer: "canvas" }), I.value[t] = r), r.resize(), r.setOption(Ve(e), !0);
245
+ });
246
+ }, G = () => {
247
+ setTimeout(() => {
248
+ W();
249
+ }, 100);
250
+ }, K = () => {
251
+ Object.values(I.value).forEach((e) => {
252
+ e && !e.isDisposed() && e.dispose();
253
+ }), I.value = {}, F.value = {};
254
+ }, q = () => {
255
+ B.value = !0, P.value = !0, Q().finally(() => {
256
+ P.value = !1;
257
+ });
258
+ }, He = () => {
259
+ B.value = !1, K(), Ie("close", "HdQxServiceEffects");
260
+ }, J = (e) => e ? e.data === void 0 ? e.result === void 0 ? e : e.result : e.data?.result?.output === void 0 ? e.data?.result === void 0 ? e.data : e.data.result : e.data.result.output : null, Y = (e) => {
261
+ if (!e) return [];
262
+ if (Array.isArray(e)) return e;
263
+ if (typeof e == "object") {
264
+ let t = Object.values(e);
265
+ if (t.length) return t;
266
+ }
267
+ return [];
268
+ }, Ue = (e) => `${e.getFullYear()}年${String(e.getMonth() + 1).padStart(2, "0")}月${String(e.getDate()).padStart(2, "0")}日`, We = (e) => {
269
+ if (!e) return null;
270
+ if (typeof e == "object") return e;
271
+ try {
272
+ return JSON.parse(e);
273
+ } catch {
274
+ return null;
275
+ }
276
+ }, Ge = (e) => e ? e.split("&&").map((e) => {
277
+ let t = e.match(/^(.*?)\{\{(.+?)\}\}(.*)$/);
278
+ return t ? {
279
+ color: "#05ddfa",
280
+ label: t[1],
281
+ value: t[2].trim(),
282
+ unit: t[3]
283
+ } : null;
284
+ }).filter(Boolean) : [], Ke = (e, t = []) => {
285
+ if (e && Array.isArray(e) && e.length) return e;
286
+ if (e && typeof e == "object") {
287
+ let t = Object.values(e);
288
+ if (t.length) return t;
289
+ }
290
+ return (t || []).flatMap((e) => Ge(e.top_title || ""));
291
+ }, qe = (e) => e ? (Array.isArray(e) ? e : Y(e)).map((e) => {
292
+ let t = e.chart_type || e.type || "bar", n = We(e.dataset) || [], r = (Array.isArray(n) ? n : []).map((e) => ({
293
+ x: e.years || e.year || e.x || e.name || "",
294
+ y: Number(e.amount || e.value || e.y || 0)
295
+ }));
296
+ return {
297
+ type: {
298
+ 柱状图: "bar",
299
+ 折线图: "line",
300
+ 面积图: "area",
301
+ 饼图: "pie"
302
+ }[t] || t || "bar",
303
+ title: e.bottom_title || e.title || "",
304
+ data: r,
305
+ color: e.color || "#5B7CF2",
306
+ showLabel: e.showLabel !== !1,
307
+ yAxisName: e.yAxisName || ""
308
+ };
309
+ }) : [], X = async () => {
310
+ let e = M.ids?.img;
311
+ if (!e?.id) {
312
+ console.warn("HdHeatService 缺少图片工作流配置");
313
+ return;
314
+ }
315
+ try {
316
+ let n = J(await t({
317
+ id: e.id,
318
+ baseHttp: M.baseHttp,
319
+ reqType: e.reqType,
320
+ variables: { configKey: M.imgKey },
321
+ isFormData: e.isFormData,
322
+ appKey: M.appKey,
323
+ appSalt: M.appSalt
324
+ }));
325
+ if (n) {
326
+ let e = n[0].file_url || n[0].url || "";
327
+ e && !e.startsWith("http") && M.imgBaseUrl && (e = `${M.imgBaseUrl}${e.startsWith("/") ? e : "/" + e}`), N.value.bgImage = e;
328
+ }
329
+ } catch (e) {
330
+ console.error("HdHeatService 图片加载失败", e);
331
+ }
332
+ }, Z = async () => {
333
+ let e = M.ids?.data;
334
+ if (!e?.id) {
335
+ console.warn("HdHeatService 缺少数据工作流配置");
336
+ return;
337
+ }
338
+ try {
339
+ let n = J(await t({
340
+ id: e.id,
341
+ baseHttp: M.baseHttp,
342
+ reqType: e.reqType,
343
+ variables: {},
344
+ isFormData: e.isFormData,
345
+ appKey: M.appKey,
346
+ appSalt: M.appSalt
347
+ }));
348
+ console.log(n, "output"), n && (M.pageType === "2" ? (L.value.deviceData = n.farmDeviceNum && n.stationNum ? n.farmDeviceNum + "(农)+" + n.stationNum + "(气)" : "", L.value.serviceCount = n.serviceTimes ?? n.serviceNum ?? 0) : M.pageType === "3" && (L.value.monitorCount = n.monitorNum ?? 0, L.value.serviceCount = n.serviceTimes ?? n.serviceNum ?? 0));
349
+ } catch (e) {
350
+ console.error("HdHeatService 数据加载失败", e);
351
+ }
352
+ }, Je = async () => {
353
+ P.value = !0;
354
+ let e = M.ids?.heat;
355
+ if (e?.id) try {
356
+ let n = J(await t({
357
+ id: e.id,
358
+ baseHttp: M.baseHttp,
359
+ reqType: e.reqType,
360
+ variables: {},
361
+ isFormData: e.isFormData,
362
+ appKey: M.appKey,
363
+ appSalt: M.appSalt
364
+ }));
365
+ n && (R.value.stationNum = n.stationNum || 0, R.value.serviceNum = n.serviceNum || 0);
366
+ } catch (e) {
367
+ console.error("HdHeatService 供热数据加载失败", e);
368
+ } finally {
369
+ P.value = !1;
370
+ }
371
+ }, Q = async () => {
372
+ P.value = !0;
373
+ let e = M.ids?.chart;
374
+ if (e?.id) try {
375
+ let n = J(await t({
376
+ id: e.id,
377
+ baseHttp: M.baseHttp,
378
+ reqType: e.reqType,
379
+ variables: { categoryType: M.serviceType },
380
+ isFormData: e.isFormData,
381
+ appKey: M.appKey,
382
+ appSalt: M.appSalt
383
+ }));
384
+ if (n) {
385
+ let e = n.charts || n.effectCharts || Y(n);
386
+ N.value.effectTitle = n.title || n.effectTitle || N.value.effectTitle || "", N.value.effectCharts = qe(e) || N.value.effectCharts || [], N.value.effectSummary = Ke(n.summary || n.effectSummary, e) || N.value.effectSummary || [];
387
+ }
388
+ } catch (e) {
389
+ console.error("HdHeatService 成效图表加载失败", e);
390
+ } finally {
391
+ P.value = !1;
392
+ }
393
+ }, Ye = async () => {
394
+ await X(), M.pageType === "1" ? (await Z(), await Je(), await Q()) : M.pageType === "2" ? (await Z(), N.value.serviceTime = Ue(/* @__PURE__ */ new Date())) : (await Z(), await Q());
395
+ }, $ = async () => {
396
+ await Ye();
397
+ };
398
+ return te(() => {
399
+ j?.on("toComponent", (e) => {
400
+ e.componentName === "HdHeatService" && $();
401
+ }), $(), window.addEventListener("resize", W);
402
+ }), ne(() => {
403
+ K(), window.removeEventListener("resize", W);
404
+ }), g(B, async (e) => {
405
+ e && (await u(), G());
406
+ }), g(U, async () => {
407
+ await u(), G();
408
+ }, { deep: !0 }), (t, i) => {
409
+ let l = n;
410
+ return f(), o("div", ie, [e.pageType == "1" ? (f(), o("div", ae, [V.value ? (f(), o("div", oe, [s("img", {
411
+ src: V.value,
412
+ alt: "供热服务"
413
+ }, null, 8, se)])) : a("", !0), s("div", ce, [
414
+ s("div", le, [
415
+ s("div", ue, [s("div", de, h(z.value.deviceLabel), 1), s("div", fe, [c(h(R.value.stationNum) + " ", 1), e.pageType == "1" ? (f(), o("span", pe, "个")) : a("", !0)])]),
416
+ i[0] ||= s("div", { class: "HdHeatService-divider" }, null, -1),
417
+ s("div", me, [s("div", he, h(z.value.materialLabel), 1), s("div", ge, [c(h(R.value.serviceNum) + " ", 1), e.pageType == "1" ? (f(), o("span", _e, "份")) : a("", !0)])])
418
+ ]),
419
+ z.value.showEffect ? (f(), o("button", {
420
+ key: 0,
421
+ class: "HdHeatService-effectBtn",
422
+ onClick: q
423
+ }, " 服务成效 ")) : a("", !0),
424
+ z.value.timePrefix ? (f(), o("div", ve, h(z.value.timePrefix) + h(Le.value), 1)) : a("", !0)
425
+ ])])) : e.pageType == "2" ? (f(), o("div", ye, [V.value ? (f(), o("div", be, [s("img", {
426
+ src: V.value,
427
+ alt: ""
428
+ }, null, 8, xe)])) : a("", !0), s("div", Se, [s("div", Ce, [
429
+ s("div", v, [s("div", y, h(z.value.deviceLabel), 1), s("div", b, h(L.value.deviceData), 1)]),
430
+ i[1] ||= s("div", { class: "HdHeatService-divider" }, null, -1),
431
+ s("div", x, [s("div", S, h(z.value.materialLabel), 1), s("div", C, h(L.value.serviceCount >= 100 ? L.value.serviceCount + "+" : L.value.serviceCount), 1)])
432
+ ])])])) : e.pageType == "3" ? (f(), o("div", w, [V.value ? (f(), o("div", T, [s("img", {
433
+ src: V.value,
434
+ alt: ""
435
+ }, null, 8, E)])) : a("", !0), s("div", D, [s("div", O, [
436
+ s("div", k, [s("div", A, h(z.value.deviceLabel), 1), s("div", we, h(L.value.monitorCount), 1)]),
437
+ i[2] ||= s("div", { class: "HdHeatService-divider" }, null, -1),
438
+ s("div", Te, [s("div", Ee, h(z.value.materialLabel), 1), s("div", De, h(L.value.serviceCount >= 100 ? L.value.serviceCount + "+" : L.value.serviceCount), 1)])
439
+ ]), z.value.showEffect ? (f(), o("button", {
440
+ key: 0,
441
+ class: "HdHeatService-effectBtn",
442
+ onClick: q
443
+ }, " 服务成效 ")) : a("", !0)])])) : a("", !0), B.value ? re((f(), o("div", Oe, [s("div", ke, [
444
+ s("button", {
445
+ class: "HdHeatService-effectClose",
446
+ onClick: He
447
+ }, [...i[3] ||= [s("span", null, "✕", -1)]]),
448
+ s("div", Ae, [s("div", je, h(Re.value), 1)]),
449
+ H.value.length ? (f(), o("div", Me, [(f(!0), o(r, null, m(H.value, (e, t) => (f(), o("div", {
450
+ key: t,
451
+ class: "HdHeatService-effectSummaryItem"
452
+ }, [
453
+ s("span", {
454
+ class: "HdHeatService-effectSummaryDot",
455
+ style: d({ background: e.color })
456
+ }, null, 4),
457
+ s("span", Ne, h(e.label), 1),
458
+ s("span", {
459
+ class: "HdHeatService-effectSummaryValue",
460
+ style: d({ color: e.color })
461
+ }, h(e.value), 5),
462
+ e.unit ? (f(), o("span", Pe, h(e.unit), 1)) : a("", !0)
463
+ ]))), 128))])) : a("", !0),
464
+ s("div", {
465
+ class: "HdHeatService-effectCharts",
466
+ style: d(ze.value)
467
+ }, [(f(!0), o(r, null, m(U.value, (e, t) => (f(), o("div", {
468
+ key: t,
469
+ class: "HdHeatService-effectChartWrap"
470
+ }, [s("div", {
471
+ ref_for: !0,
472
+ ref: (e) => Be(e, t),
473
+ class: "HdHeatService-effectChart"
474
+ }, null, 512), s("div", Fe, h(e.title), 1)]))), 128))], 4)
475
+ ])])), [[l, P.value]]) : a("", !0)]);
476
+ };
477
+ }
478
+ }), [["__scopeId", "data-v-14de3cea"]]);
479
+ //#endregion
480
+ export { j as t };