nxd-plugin 1.8.21 → 1.8.23

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 (106) hide show
  1. package/dist/chunks/YCServiceSummary-D9qP6hLO.mjs +2 -0
  2. package/dist/chunks/{component-AiChat-C_DePYiS.mjs → component-AiChat-BwP3zj0h.mjs} +1167 -884
  3. package/dist/chunks/{component-AqiMonitor-B4ZLQZOd.mjs → component-AqiMonitor-Cga2wb4h.mjs} +27 -31
  4. package/dist/chunks/{component-ChartCumulativePre-DQqNwEkp.mjs → component-ChartCumulativePre-CkQrY-fM.mjs} +2 -2
  5. package/dist/chunks/{component-ChartServiceMaterial-BSXCSmjT.mjs → component-ChartServiceMaterial-BSfXMgj4.mjs} +2 -2
  6. package/dist/chunks/{component-Duty-DnkxgYav.mjs → component-Duty-DLMdCDNu.mjs} +2 -2
  7. package/dist/chunks/{component-EarlyWarningStatistic-DZIISSb4.mjs → component-EarlyWarningStatistic-CHCmDM5w.mjs} +2 -2
  8. package/dist/chunks/{component-EarlyWarningStatistic2-vSCEWtaq.mjs → component-EarlyWarningStatistic2-D_Uc9rbm.mjs} +2 -2
  9. package/dist/chunks/{component-Forecast72h-DicwnEaB.mjs → component-Forecast72h-CwDS2BCV.mjs} +91 -92
  10. package/dist/chunks/{component-GeologyLiveAlarm-DcLkKxQi.mjs → component-GeologyLiveAlarm-TXjC0N1b.mjs} +2 -2
  11. package/dist/chunks/{component-GridForecastMsg-B1J5xBf1.mjs → component-GridForecastMsg-J7V2m_bm.mjs} +1 -2
  12. package/dist/chunks/{component-HDSeaLegend-ubUWj-K6.mjs → component-HDSeaLegend-BbW1vk-L.mjs} +2 -1
  13. package/dist/chunks/{component-HdCameraList-DE5T_NCe.mjs → component-HdCameraList-ya7gQWsk.mjs} +84 -101
  14. package/dist/chunks/{component-HdFarmStation-Dr16UrnR.mjs → component-HdFarmStation-DbvF94Z6.mjs} +77 -81
  15. package/dist/chunks/{component-HdFarmStationDialog-DNAo261X.mjs → component-HdFarmStationDialog-p3vjS1JB.mjs} +265 -282
  16. package/dist/chunks/{component-HdForecastProducts-DW94eZkZ.mjs → component-HdForecastProducts-2ZXLMLdw.mjs} +1 -2
  17. package/dist/chunks/{component-HdHeatChart-QyRCV140.mjs → component-HdHeatChart-CM4uhNsK.mjs} +1 -2
  18. package/dist/chunks/{component-HdHeatChartDialog-CwUk9qQm.mjs → component-HdHeatChartDialog-CxIaxIg5.mjs} +2 -3
  19. package/dist/chunks/{component-HdHeatService-Cbsa46Kg.mjs → component-HdHeatService-BNRBwLEC.mjs} +1 -2
  20. package/dist/chunks/{component-HdInsectDetailList-Br06iK7W.mjs → component-HdInsectDetailList-CNfJip9R.mjs} +1 -2
  21. package/dist/chunks/{component-HdInsectList-Djo-0pVh.mjs → component-HdInsectList-D0fRM6cx.mjs} +1 -2
  22. package/dist/chunks/component-HdMajorActivity-C95MgI5Y.mjs +704 -0
  23. package/dist/chunks/{component-HdObservation-5k_0GZGV.mjs → component-HdObservation-DUMGmfJN.mjs} +3 -4
  24. package/dist/chunks/{component-HdPreSituation-B0yXJZVG.mjs → component-HdPreSituation-IILymZ3h.mjs} +3 -4
  25. package/dist/chunks/{component-HdQxServiceEffects-Ds1vj_DV.mjs → component-HdQxServiceEffects-B-C0VBH3.mjs} +1 -2
  26. package/dist/chunks/{component-HdRadarList-NLZ0YNV8.mjs → component-HdRadarList-DSMrSb-T.mjs} +3 -3
  27. package/dist/chunks/{component-HdRadarTime-D7-YoOkE.mjs → component-HdRadarTime-FEhuGBEg.mjs} +1 -2
  28. package/dist/chunks/{component-HdRadarTimeLine-CJ0_ejKf.mjs → component-HdRadarTimeLine-UfzKKTgp.mjs} +1 -2
  29. package/dist/chunks/{component-HdRisk-fuJNWgJD.mjs → component-HdRisk-B3N71NoC.mjs} +2 -3
  30. package/dist/chunks/{component-HdSeaCase-D21rq9pv.mjs → component-HdSeaCase-Cim-Y8hP.mjs} +1 -2
  31. package/dist/chunks/{component-HdServiceMarterial-CgcHHy6J.mjs → component-HdServiceMarterial-BxifbLBR.mjs} +2 -3
  32. package/dist/chunks/{component-HdServiceRequirements-D2EdgZjN.mjs → component-HdServiceRequirements-BawMn0jA.mjs} +2 -3
  33. package/dist/chunks/{component-HdSoil-D58PIu6D.mjs → component-HdSoil-DaGj6RPD.mjs} +2 -3
  34. package/dist/chunks/{component-HdSoilDetailList-BpbPwCjd.mjs → component-HdSoilDetailList-fBu8i74J.mjs} +1 -2
  35. package/dist/chunks/{component-HdStationTem-qqZ5UXom.mjs → component-HdStationTem-DgGFJ20c.mjs} +3 -4
  36. package/dist/chunks/{component-HdSuggestion-Dbdlr5zS.mjs → component-HdSuggestion-BnpgzKkp.mjs} +2 -3
  37. package/dist/chunks/{component-HdThreeWeatherTrend-zSmR2LIO.mjs → component-HdThreeWeatherTrend-Bmire4sm.mjs} +3 -4
  38. package/dist/chunks/{component-HdWaveForcast-DllKzNgu.mjs → component-HdWaveForcast-Bc3sB9Fn.mjs} +2 -3
  39. package/dist/chunks/{component-HighQuality-BNVnCK0d.mjs → component-HighQuality-DjDZKwMT.mjs} +1 -2
  40. package/dist/chunks/{component-HighWayEarlyWarningRed-CwzMQCqp.mjs → component-HighWayEarlyWarningRed-CzBI_AJA.mjs} +2 -2
  41. package/dist/chunks/{component-HighWayFreeze-Ds2Hz7pR.mjs → component-HighWayFreeze-sFMx0umE.mjs} +2 -2
  42. package/dist/chunks/{component-HighwayLiveAlarm-Do4pwmnJ.mjs → component-HighwayLiveAlarm-Ozq7Y8qF.mjs} +2 -2
  43. package/dist/chunks/{component-HighwayLiveAlarmNew-DoWns_RH.mjs → component-HighwayLiveAlarmNew-ByL2OYk0.mjs} +3 -3
  44. package/dist/chunks/{component-HighwayStations-BBQa33JX.mjs → component-HighwayStations-DXj5h1vg.mjs} +2 -2
  45. package/dist/chunks/{component-HighwayWeatherForecast-C-kwyE6Q.mjs → component-HighwayWeatherForecast-6I714FL1.mjs} +69 -69
  46. package/dist/chunks/{component-IframeWeb-uP8unwJj.mjs → component-IframeWeb-DDYUNdVl.mjs} +1 -1
  47. package/dist/chunks/{component-ImageGeneration-CLAge4U1.mjs → component-ImageGeneration-C0K8D1lM.mjs} +2 -1
  48. package/dist/chunks/{component-IntroducePic-C8X8Y6hx.mjs → component-IntroducePic-Bzsjmjql.mjs} +1 -2
  49. package/dist/chunks/{component-LithiumBatteryMiningArea-xc5REiPe.mjs → component-LithiumBatteryMiningArea-ClvF3vsD.mjs} +2 -2
  50. package/dist/chunks/{component-MapPopup-DXRLi4wJ.mjs → component-MapPopup-BnKmR10m.mjs} +1 -1
  51. package/dist/chunks/{component-MaterialPreview-B9iSbEIO.mjs → component-MaterialPreview-DG5VgGJp.mjs} +1 -2
  52. package/dist/chunks/{component-PieLegend-DPwAQJxO.mjs → component-PieLegend-Y_AZPS0g.mjs} +1 -1
  53. package/dist/chunks/{component-PrecipitationRanking-CwP3NZlf.mjs → component-PrecipitationRanking-71G9U_UP.mjs} +3 -4
  54. package/dist/chunks/{component-RadarChart-BxEzHVOE.mjs → component-RadarChart-u6Xs1TTB.mjs} +2 -2
  55. package/dist/chunks/{component-RadarLegend-DVoe6ojQ.mjs → component-RadarLegend-9ahVi99l.mjs} +1 -1
  56. package/dist/chunks/{component-RadarShortTerm-7v_EauV4.mjs → component-RadarShortTerm-wwvpXBvp.mjs} +4 -4
  57. package/dist/chunks/{component-RadarTime-CT8WOoJR.mjs → component-RadarTime-BqkIprmh.mjs} +2 -2
  58. package/dist/chunks/{component-RenderMarkdown-CxAwaqBM.mjs → component-RenderMarkdown-Cip_f4e8.mjs} +2 -2
  59. package/dist/chunks/{component-ReservoirLiveAlarm-CWkaa2z8.mjs → component-ReservoirLiveAlarm-D6fDm2mR.mjs} +3 -3
  60. package/dist/chunks/{component-ServiceMaterial-CNjEwMGZ.mjs → component-ServiceMaterial-DHdRLUhG.mjs} +2 -2
  61. package/dist/chunks/{component-ServiceMaterialsBtn-DWBa1Hpa.mjs → component-ServiceMaterialsBtn-B6fjh9Bc.mjs} +2 -1
  62. package/dist/chunks/{component-StationDialog-usekZclX.mjs → component-StationDialog-DP9cwrI_.mjs} +2 -3
  63. package/dist/chunks/{component-StationList-B0bav8JG.mjs → component-StationList-Cfmz5c3d.mjs} +3 -4
  64. package/dist/chunks/{component-TimeBasedForecast-l0RpjVYi.mjs → component-TimeBasedForecast-DIBNCv4O.mjs} +36 -36
  65. package/dist/chunks/{component-Typhoon-Cf8qko_n.mjs → component-Typhoon-4Oj6wl91.mjs} +16 -16
  66. package/dist/chunks/{component-WarningLine-B2HyTDUW.mjs → component-WarningLine-XjCN_f4w.mjs} +2 -2
  67. package/dist/chunks/{component-WarningSignal-Cy8MQ6oC.mjs → component-WarningSignal-DPUOC73O.mjs} +3 -3
  68. package/dist/chunks/{component-WeatherForecast-B-MV7oqR.mjs → component-WeatherForecast-Cl3G0gZG.mjs} +36 -36
  69. package/dist/chunks/{component-YCDataMonitor-p7tSzU_b.mjs → component-YCDataMonitor-Cmugq2Hc.mjs} +1 -2
  70. package/dist/chunks/{component-YCDataService-BBVuyu-D.mjs → component-YCDataService-Veq9EEB6.mjs} +3 -4
  71. package/dist/chunks/{component-YCHighWaySummary-BH34LVVj.mjs → component-YCHighWaySummary-BfcLGdxr.mjs} +2 -2
  72. package/dist/chunks/{component-YCHome-CtSa__qB.mjs → component-YCHome-BgGFtVlS.mjs} +3 -4
  73. package/dist/chunks/{component-YCHomeLegend-DqzGcZgD.mjs → component-YCHomeLegend-jG8vwIka.mjs} +2 -1
  74. package/dist/chunks/{component-YCLoginNew-zgG8m4VV.mjs → component-YCLoginNew-BKMD-5TL.mjs} +9 -10
  75. package/dist/chunks/component-YCServiceSummary-C2K81UiN.mjs +869 -0
  76. package/dist/components/AiChat/AiChat.vue.d.ts +18 -0
  77. package/dist/components/AiChat/AiChatResponse.vue.d.ts +2 -0
  78. package/dist/components/AiChat/AiChatThinking.vue.d.ts +4 -0
  79. package/dist/components/AiChat/types.d.ts +1 -0
  80. package/dist/components/HdCameraList/HdCameraList.vue.d.ts +0 -10
  81. package/dist/components/HdFarmStationDialog/HdFarmStationDialog.vue.d.ts +0 -69
  82. package/dist/components/HdMajorActivity/HdMajorActivity.vue.d.ts +74 -0
  83. package/dist/components/YCServiceSummary/YCAIChatPanel.vue.d.ts +22 -2
  84. package/dist/components/YCServiceSummary/YCServiceSummary.vue.d.ts +21 -2
  85. package/dist/components/YCServiceSummary/YCServiceSummaryGeologyRefineAnalysis.vue.d.ts +24 -0
  86. package/dist/components/YCServiceSummary/YCServiceSummaryGeologyTrafficAnalysis.vue.d.ts +24 -0
  87. package/dist/components/YCServiceSummary/YCServiceSummaryRefineAnalysis.vue.d.ts +21 -2
  88. package/dist/components/YCServiceSummary/YCServiceSummaryReservoirRefineAnalysis.vue.d.ts +24 -0
  89. package/dist/components/YCServiceSummary/YCServiceSummaryReservoirTrafficAnalysis.vue.d.ts +24 -0
  90. package/dist/components/YCServiceSummary/YCServiceSummaryTrafficAnalysis.vue.d.ts +21 -2
  91. package/dist/index.d.ts +2 -1
  92. package/dist/nxd-plugin.mjs +75 -74
  93. package/dist/styles/component-AiChat.css +1 -1
  94. package/dist/styles/component-Forecast72h.css +1 -1
  95. package/dist/styles/component-HdCameraList.css +1 -1
  96. package/dist/styles/component-HdFarmStation.css +1 -1
  97. package/dist/styles/component-HdFarmStationDialog.css +1 -1
  98. package/dist/styles/component-HdInsectDetailList.css +1 -1
  99. package/dist/styles/component-HdMajorActivity.css +1 -0
  100. package/dist/styles/component-YCLoginNew.css +1 -1
  101. package/dist/styles/component-YCServiceSummary.css +1 -1
  102. package/dist/utils/request.d.ts +1 -0
  103. package/package.json +1 -1
  104. package/dist/chunks/YCServiceSummary-9W7E-cRv.mjs +0 -2
  105. package/dist/chunks/component-YCServiceSummary-KF3yjd4u.mjs +0 -354
  106. package/dist/components/YCServiceSummary/types.d.ts +0 -14
@@ -0,0 +1,869 @@
1
+ import { i as e, n as t, o as n } from "./component-AiChat-BwP3zj0h.mjs";
2
+ import { ElLoadingDirective as r } from "element-plus/es";
3
+ import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, nextTick as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, vModelText as S, watch as C, withDirectives as w } from "vue";
4
+ import * as T from "echarts";
5
+ import E from "axios";
6
+ //#region src/components/YCServiceSummary/YCAIChatPanel.vue?vue&type=script&setup=true&lang.ts
7
+ var D = { class: "YCAIChatPanel" }, O = {
8
+ key: 0,
9
+ class: "YCAIChatPanel-message-avatar"
10
+ }, k = { class: "YCAIChatPanel-message-body" }, A = {
11
+ key: 0,
12
+ class: "YCAIChatPanel-message-line"
13
+ }, ee = ["innerHTML"], te = {
14
+ key: 0,
15
+ class: "YCAIChatPanel-subMenu"
16
+ }, ne = ["onClick"], re = ["src"], ie = { class: "YCAIChatPanel-footer" }, ae = { class: "YCAIChatPanel-mainMenu" }, oe = ["onClick"], se = { class: "YCAIChatPanel-inputBar" }, ce = ["placeholder"], le = ["disabled"], j = 2e3, ue = 300 * 1e3, de = "正在思考...", fe = "做材料", M = /* @__PURE__ */ e(/* @__PURE__ */ f({
17
+ __name: "YCAIChatPanel",
18
+ props: [
19
+ "appKey",
20
+ "appSalt",
21
+ "baseHttp",
22
+ "interfaceBaseHttp",
23
+ "onlyofficeCallbackUrl",
24
+ "username",
25
+ "password",
26
+ "ids",
27
+ "theme"
28
+ ],
29
+ setup(e) {
30
+ let r = e, u = [
31
+ "查数据",
32
+ "查知识",
33
+ "查材料"
34
+ ], d = y(null), f = y(null), p = y(""), C = y(!1), T = y(""), M = y(""), N = y(null), P = y([]), F = y(r.appKey || ""), I = null, L = y([{
35
+ role: "ai",
36
+ content: "已接入实况与预报数据,请问需要什么帮助?",
37
+ status: "end"
38
+ }]), R = a(() => P.value.length ? P.value.map((e) => ({
39
+ key: e.label,
40
+ label: e.label
41
+ })) : u.map((e) => ({
42
+ key: e,
43
+ label: e
44
+ }))), z = a(() => T.value && P.value.find((e) => e.label === T.value)?.list || []), B = a(() => !!T.value && !!p.value.trim() && !C.value), V = a(() => T.value ? "请输入问题" : "请先选择类别"), H = a(() => r.theme === "dark" ? new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAACVBMVEVHcEz////////mcEUwAAAAAnRSTlMAfVgnwLkAAAD9SURBVHja7dmhDcMwAETRJmoNwks8QqcwLgrpEpnGuCjAJDdlyVXFH4RUd/yDF8WSJV+yLMuyLDtxtxUn26DFLDWYFKnDZJEGTKp08ESNJ50mGFOEMUUYM4ljNo6pwQQTTDDBBBNMMMEEE0wwp2KuK8Y8DoqZpAYxs9QBxvUOMYs0AIYkxpDEGJIYQxJjUGIMSYwhiTEkMQYlxjghGCcE44RgnCCME4JxQjBOCMYJwjghGCcE44RgnBDM0wnAvJ0AjFhSeVJ4MqHEGJ5UnhSeTE4wZiC5QDILJwtPKk+2P0oe+m3nX6yDH9Jr6HSJXBnvr+/WPANlWZZl2Yn7ANxo7eonko39AAAAAElFTkSuQmCC", "" + import.meta.url).href : new URL("data:image/png;base64,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", "" + import.meta.url).href);
45
+ _(() => {
46
+ U();
47
+ }), g(() => {
48
+ X();
49
+ });
50
+ let U = async () => {
51
+ await W(), await pe(), !T.value && R.value.length && K(R.value[0].key);
52
+ }, W = async () => {
53
+ if (!r.username || !r.password) {
54
+ console.warn("[YCAIChatPanel] 未配置 username/password,跳过登录");
55
+ return;
56
+ }
57
+ try {
58
+ let e = (r.interfaceBaseHttp || r.baseHttp).replace(/\/$/, "").replace(/\/userCenter\/mobileBot$/, ""), t = await E.post(`${e}/userCenter/auth/login`, {
59
+ account: r.username,
60
+ password: r.password,
61
+ validToken: "SLIDER_external"
62
+ }), n = t.data?.data?.token || t.data?.token || "";
63
+ n && (F.value = n);
64
+ } catch (e) {
65
+ console.error("[YCAIChatPanel] 登录失败:", e);
66
+ }
67
+ }, G = (e) => Array.isArray(e) ? e : !e || typeof e != "object" ? null : e.output ?? e.list ?? e.items ?? e.children ?? e.data ?? e.records ?? null, pe = async () => {
68
+ let e = r.ids?.subMenu;
69
+ if (!e?.id) {
70
+ console.warn("[YCAIChatPanel] 未配置 subMenu 工作流 id");
71
+ return;
72
+ }
73
+ try {
74
+ let t = await n({
75
+ appKey: r.appKey,
76
+ appSalt: r.appSalt,
77
+ id: e.id,
78
+ variables: { newParam: "subMenu" },
79
+ baseHttp: r.baseHttp.replace(/\/$/, ""),
80
+ reqType: e.reqType || "post",
81
+ isFormData: e.isFormData ?? !1
82
+ }), i = t?.data?.result ?? t?.data;
83
+ if (typeof i == "string") try {
84
+ i = JSON.parse(i);
85
+ } catch {
86
+ i = null;
87
+ }
88
+ let a = G(i);
89
+ if (typeof a == "string") try {
90
+ a = JSON.parse(a);
91
+ } catch {
92
+ a = null;
93
+ }
94
+ if (a = G(a) || a, !Array.isArray(a) || !a.length) return;
95
+ P.value = a.map((e) => {
96
+ let t = G(e) || e?.list || [];
97
+ return {
98
+ label: (e.label || e.name || e.title || "").trim(),
99
+ list: (t || []).map((e) => ({
100
+ title: (e.title || e.name || e.label || "").trim(),
101
+ content: (e.content || e.value || e.text || "").trim(),
102
+ id: e.id
103
+ }))
104
+ };
105
+ }).filter((e) => e.label && e.label !== fe);
106
+ } catch (e) {
107
+ console.error("[YCAIChatPanel] 获取菜单失败:", e);
108
+ }
109
+ }, K = (e) => {
110
+ T.value = e, M.value = e, N.value = null, p.value = "", m(() => Q());
111
+ }, me = (e) => {
112
+ N.value = e, p.value = e.content || "", m(() => {
113
+ Q(), d.value?.focus();
114
+ });
115
+ }, he = (e) => t(e || "").replace(/>\n+</g, "><"), q = async () => {
116
+ let e = p.value.trim(), t = T.value || M.value;
117
+ if (!(!e || !t || C.value)) {
118
+ T.value = t, M.value = t, C.value = !0, L.value.push({
119
+ role: "user",
120
+ content: e,
121
+ status: "end"
122
+ }), L.value.push({
123
+ role: "ai",
124
+ content: de,
125
+ status: "thinking"
126
+ }), p.value = "", m(() => {
127
+ Q(), Z();
128
+ }), X();
129
+ try {
130
+ N.value?.id ? await ge(e, N.value.id) : await _e(e);
131
+ } catch (e) {
132
+ console.error("[YCAIChatPanel] 发送失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
133
+ }
134
+ }
135
+ }, ge = async (e, t) => {
136
+ try {
137
+ let i = await n({
138
+ appKey: r.appKey,
139
+ appSalt: r.appSalt,
140
+ id: t,
141
+ variables: { newParam: e },
142
+ baseHttp: r.baseHttp.replace(/\/$/, ""),
143
+ reqType: "post",
144
+ isFormData: !1
145
+ }), a = i?.data?.result || i?.data;
146
+ Y((typeof a?.output == "string" ? a.output : "") || "暂无返回结果");
147
+ } catch (e) {
148
+ console.error("[YCAIChatPanel] 工作流请求失败:", e), Y("请求失败,请稍后重试", "error");
149
+ } finally {
150
+ C.value = !1;
151
+ }
152
+ }, _e = async (e) => {
153
+ let t = (r.interfaceBaseHttp || "").replace(/\/$/, "");
154
+ if (!t) {
155
+ Y("未配置 interfaceBaseHttp", "error"), C.value = !1;
156
+ return;
157
+ }
158
+ let n = {};
159
+ F.value && (n["aiflowy-token"] = F.value);
160
+ let i = Date.now();
161
+ try {
162
+ let r = (await E.post(`${t}/chat`, { content: e }, { headers: n })).data;
163
+ if (r?.errorCode !== void 0 && r?.errorCode !== 0 && r?.errorCode !== 200) throw Error(r?.message || "提交问题失败");
164
+ let a = r?.data?.taskId, o = r?.data?.intentName || "", s = r?.data?.status;
165
+ if (!a) throw Error("未获取到 taskId");
166
+ if (o && ve(`正在思考【${o}】...`), s === "done") {
167
+ await J(a, t, n, i);
168
+ return;
169
+ }
170
+ I = setTimeout(() => J(a, t, n, i), j);
171
+ } catch (e) {
172
+ console.error("[YCAIChatPanel] mobileBot 对话失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
173
+ }
174
+ }, J = async (e, t, n, r) => {
175
+ if (Date.now() - r > ue) {
176
+ Y("查询超时,请稍后重试", "error"), C.value = !1, X();
177
+ return;
178
+ }
179
+ try {
180
+ let i = (await E.get(`${t}/result/${e}`, { headers: n })).data;
181
+ if (i?.errorCode !== void 0 && i?.errorCode !== 0 && i?.errorCode !== 200) throw Error(i?.message || "查询结果失败");
182
+ let a = i?.data || {}, o = a.status, s = a.markdown;
183
+ if (o === "running") {
184
+ I = setTimeout(() => J(e, t, n, r), j);
185
+ return;
186
+ }
187
+ if (o === "fail") {
188
+ Y(s || "查询失败", "error"), C.value = !1, X();
189
+ return;
190
+ }
191
+ Y(s || ""), C.value = !1, X();
192
+ } catch (e) {
193
+ console.error("[YCAIChatPanel] 轮询结果失败:", e), Y("查询结果失败,请稍后重试", "error"), C.value = !1, X();
194
+ }
195
+ }, Y = (e, t = "end") => {
196
+ L.value.push({
197
+ role: "ai",
198
+ content: e,
199
+ status: t
200
+ }), Z();
201
+ }, ve = (e) => {
202
+ let t = L.value[L.value.length - 1];
203
+ !t || t.role !== "ai" || t.status !== "thinking" || (t.content = e, Z());
204
+ }, X = () => {
205
+ I &&= (clearTimeout(I), null);
206
+ }, Z = async () => {
207
+ await m();
208
+ let e = f.value;
209
+ e && (e.scrollTop = e.scrollHeight);
210
+ }, Q = () => {
211
+ let e = d.value;
212
+ if (!e) return;
213
+ e.style.height = "auto", e.style.overflowY = "hidden";
214
+ let t = Math.min(e.scrollHeight, 300);
215
+ e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > 300 ? "auto" : "hidden";
216
+ }, $ = (e) => {
217
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), q());
218
+ };
219
+ return (e, t) => (v(), s("div", D, [
220
+ t[3] ||= l("<div class=\"YCAIChatPanel-head\" data-v-c958b0ae><div class=\"YCAIChatPanel-head-title\" data-v-c958b0ae><span class=\"YCAIChatPanel-head-icon\" data-v-c958b0ae></span><span data-v-c958b0ae>智能助手</span></div><div class=\"YCAIChatPanel-head-status\" data-v-c958b0ae><span class=\"YCAIChatPanel-head-dot\" data-v-c958b0ae></span><span data-v-c958b0ae>在线</span></div></div>", 1),
221
+ c("div", {
222
+ class: "YCAIChatPanel-messages",
223
+ ref_key: "messagesRef",
224
+ ref: f
225
+ }, [(v(!0), s(i, null, b(L.value, (e, n) => (v(), s("div", {
226
+ key: n,
227
+ class: h(["YCAIChatPanel-message", `YCAIChatPanel-message--${e.role}`])
228
+ }, [e.role === "ai" ? (v(), s("div", O, [...t[1] ||= [c("span", null, "AI", -1)]])) : o("", !0), c("div", k, [e.role === "user" ? (v(), s("div", A, x(e.content), 1)) : (v(), s("div", {
229
+ key: 1,
230
+ class: "YCAIChatPanel-message-line",
231
+ innerHTML: he(e.content)
232
+ }, null, 8, ee))])], 2))), 128))], 512),
233
+ z.value.length ? (v(), s("div", te, [(v(!0), s(i, null, b(z.value, (e) => (v(), s("div", {
234
+ key: e.id || e.title,
235
+ class: "YCAIChatPanel-subMenu-item",
236
+ onClick: (t) => me(e)
237
+ }, [c("span", null, x(e.title), 1), c("img", {
238
+ class: "YCAIChatPanel-subMenu-arrow",
239
+ src: H.value,
240
+ alt: ""
241
+ }, null, 8, re)], 8, ne))), 128))])) : o("", !0),
242
+ c("div", ie, [c("div", ae, [(v(!0), s(i, null, b(R.value, (e) => (v(), s("button", {
243
+ key: e.key,
244
+ class: h(["YCAIChatPanel-mainMenu-btn", { "is-active": T.value === e.key }]),
245
+ onClick: (t) => K(e.key)
246
+ }, x(e.label), 11, oe))), 128))]), c("div", se, [w(c("textarea", {
247
+ ref_key: "textareaRef",
248
+ ref: d,
249
+ "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
250
+ class: "YCAIChatPanel-textarea",
251
+ placeholder: V.value,
252
+ rows: "1",
253
+ onInput: Q,
254
+ onKeydown: $
255
+ }, null, 40, ce), [[S, p.value]]), c("button", {
256
+ class: "YCAIChatPanel-send",
257
+ disabled: !B.value,
258
+ onClick: q,
259
+ title: "发送"
260
+ }, [...t[2] ||= [c("svg", {
261
+ viewBox: "0 0 24 24",
262
+ width: "16",
263
+ height: "16",
264
+ fill: "currentColor"
265
+ }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, le)])])
266
+ ]));
267
+ }
268
+ }), [["__scopeId", "data-v-c958b0ae"]]), N = ["element-loading-background"], P = "#ff4d4f", F = "#52c41a", I = /* @__PURE__ */ e(/* @__PURE__ */ f({
269
+ __name: "YCServiceSummaryRefineAnalysis",
270
+ props: [
271
+ "appKey",
272
+ "appSalt",
273
+ "baseHttp",
274
+ "interfaceBaseHttp",
275
+ "onlyofficeCallbackUrl",
276
+ "username",
277
+ "password",
278
+ "ids",
279
+ "theme"
280
+ ],
281
+ setup(e) {
282
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
283
+ let e = o.value;
284
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
285
+ };
286
+ _(() => {
287
+ p(), window.addEventListener("resize", O);
288
+ }), g(() => {
289
+ window.removeEventListener("resize", O), l && l.dispose();
290
+ });
291
+ let p = async () => {
292
+ let e = t.ids?.road;
293
+ if (!e?.id) {
294
+ console.warn("[YCServiceSummaryRefineAnalysis] ids.road 未配置");
295
+ return;
296
+ }
297
+ u.value = !0;
298
+ try {
299
+ let r = (await n({
300
+ appKey: t.appKey,
301
+ appSalt: t.appSalt,
302
+ id: e.id,
303
+ variables: {},
304
+ baseHttp: t.baseHttp,
305
+ reqType: e.reqType,
306
+ isFormData: e.isFormData
307
+ }))?.data?.result?.ds;
308
+ if (typeof r == "string") try {
309
+ r = JSON.parse(r);
310
+ } catch {
311
+ r = null;
312
+ }
313
+ i.value = (Array.isArray(r) ? r : r?.data || []).map((e) => {
314
+ let t = S(e), n = t.iswarnrainfall_1h || t.iswarnrainfall_6h || t.iswarntemp || t.iswarnvis ? P : F;
315
+ return {
316
+ value: 1,
317
+ name: e.name,
318
+ itemStyle: { color: n },
319
+ warnTags: E(t)
320
+ };
321
+ }), await m(), D();
322
+ } catch (e) {
323
+ console.error("[YCServiceSummaryRefineAnalysis] 实况数据加载失败", e);
324
+ } finally {
325
+ u.value = !1;
326
+ }
327
+ }, h = (e) => {
328
+ let t = Number(e);
329
+ return t < 999999 && t > -999999;
330
+ }, b = (e, t, n) => e.find((e) => e?.[t] === 1 && h(e?.[n])) || e.find((e) => e?.[t] === 1), x = (e, t) => (e || []).find((e) => e?.zdzds?.[t] === 1), S = (e) => {
331
+ let t = e.zdzds || [], n = e.zhds || [], r = b(t, "iswarnpre", "rainfall_1h"), i = b(t, "iswarnpre_6", "rainfall_6h"), a = b(t, "iswarntemp", "temperature"), o = b(t, "iswarnvis", "visibility_min"), s = x(n, "iswarnpre"), c = x(n, "iswarnpre_6"), l = x(n, "iswarntemp"), u = x(n, "iswarnvis");
332
+ return {
333
+ iswarnrainfall_1h: r || s ? 1 : 0,
334
+ iswarnrainfall_6h: i || c ? 1 : 0,
335
+ iswarntemp: a || l ? 1 : 0,
336
+ iswarnvis: o || u ? 1 : 0
337
+ };
338
+ }, E = (e) => {
339
+ let t = [];
340
+ return (e.iswarnrainfall_1h === 1 || e.iswarnrainfall_6h === 1) && t.push("降水"), e.iswarntemp === 1 && t.push("温度"), e.iswarnvis === 1 && t.push("能见度"), t;
341
+ }, D = () => {
342
+ if (!o.value) return;
343
+ let e = f();
344
+ l ||= T.init(o.value), l.setOption({
345
+ tooltip: {
346
+ trigger: "item",
347
+ formatter: (e) => {
348
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || F;
349
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
350
+ }
351
+ },
352
+ series: [{
353
+ type: "pie",
354
+ radius: ["30%", "65%"],
355
+ center: ["50%", "50%"],
356
+ label: {
357
+ show: !0,
358
+ position: "outside",
359
+ fontSize: 11,
360
+ color: e,
361
+ formatter: "{b}"
362
+ },
363
+ labelLine: {
364
+ length: 10,
365
+ length2: 8
366
+ },
367
+ data: i.value
368
+ }]
369
+ });
370
+ };
371
+ C(() => t.theme, async () => {
372
+ await m(), D();
373
+ });
374
+ let O = () => {
375
+ l?.resize();
376
+ };
377
+ return (e, t) => {
378
+ let n = r;
379
+ return w((v(), s("div", {
380
+ class: "YCServiceSummaryRefineAnalysis",
381
+ "element-loading-background": d.value,
382
+ "element-loading-text": "加载中"
383
+ }, [c("div", {
384
+ class: "YCServiceSummaryRefineAnalysis-chart",
385
+ ref_key: "chartRef",
386
+ ref: o
387
+ }, null, 512)], 8, N)), [[n, u.value]]);
388
+ };
389
+ }
390
+ }), [["__scopeId", "data-v-118dfe5e"]]), L = ["element-loading-background"], R = "#ff4d4f", z = "#52c41a", B = /* @__PURE__ */ e(/* @__PURE__ */ f({
391
+ __name: "YCServiceSummaryTrafficAnalysis",
392
+ props: [
393
+ "appKey",
394
+ "appSalt",
395
+ "baseHttp",
396
+ "interfaceBaseHttp",
397
+ "onlyofficeCallbackUrl",
398
+ "username",
399
+ "password",
400
+ "ids",
401
+ "theme"
402
+ ],
403
+ setup(e) {
404
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
405
+ let e = o.value;
406
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
407
+ };
408
+ _(() => {
409
+ p(), window.addEventListener("resize", S);
410
+ }), g(() => {
411
+ window.removeEventListener("resize", S), l && l.dispose();
412
+ });
413
+ let p = async () => {
414
+ let e = t.ids?.shortTerm;
415
+ if (!e?.id) {
416
+ console.warn("[YCServiceSummaryTrafficAnalysis] ids.shortTerm 未配置");
417
+ return;
418
+ }
419
+ u.value = !0;
420
+ try {
421
+ let r = (await n({
422
+ appKey: t.appKey,
423
+ appSalt: t.appSalt,
424
+ id: e.id,
425
+ variables: {},
426
+ baseHttp: t.baseHttp,
427
+ reqType: e.reqType,
428
+ isFormData: e.isFormData
429
+ }))?.data?.result?.ds;
430
+ if (typeof r == "string") try {
431
+ r = JSON.parse(r);
432
+ } catch {
433
+ r = null;
434
+ }
435
+ i.value = (Array.isArray(r) ? r : []).map((e) => {
436
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? R : z;
437
+ return {
438
+ value: 1,
439
+ name: e.name,
440
+ itemStyle: { color: n },
441
+ warnTags: b(t)
442
+ };
443
+ }), await m(), x();
444
+ } catch (e) {
445
+ console.error("[YCServiceSummaryTrafficAnalysis] 预报数据加载失败", e);
446
+ } finally {
447
+ u.value = !1;
448
+ }
449
+ }, h = (e) => {
450
+ let t = e.zhflds || [];
451
+ return {
452
+ iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
453
+ iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
454
+ iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
455
+ };
456
+ }, b = (e) => {
457
+ let t = [];
458
+ return e.iswarnpre1h === 1 && t.push("未来R1h"), e.iswarnpre2h === 1 && t.push("未来R2h"), e.iswarnpre3h === 1 && t.push("未来R3h"), t;
459
+ }, x = () => {
460
+ if (!o.value) return;
461
+ let e = f();
462
+ l ||= T.init(o.value), l.setOption({
463
+ tooltip: {
464
+ trigger: "item",
465
+ formatter: (e) => {
466
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || z;
467
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
468
+ }
469
+ },
470
+ series: [{
471
+ type: "pie",
472
+ radius: ["30%", "65%"],
473
+ center: ["50%", "50%"],
474
+ label: {
475
+ show: !0,
476
+ position: "outside",
477
+ fontSize: 11,
478
+ color: e,
479
+ formatter: "{b}"
480
+ },
481
+ labelLine: {
482
+ length: 10,
483
+ length2: 8
484
+ },
485
+ data: i.value
486
+ }]
487
+ });
488
+ };
489
+ C(() => t.theme, async () => {
490
+ await m(), x();
491
+ });
492
+ let S = () => {
493
+ l?.resize();
494
+ };
495
+ return (e, t) => {
496
+ let n = r;
497
+ return w((v(), s("div", {
498
+ class: "YCServiceSummaryTrafficAnalysis",
499
+ "element-loading-background": d.value,
500
+ "element-loading-text": "加载中"
501
+ }, [c("div", {
502
+ class: "YCServiceSummaryTrafficAnalysis-chart",
503
+ ref_key: "chartRef",
504
+ ref: o
505
+ }, null, 512)], 8, L)), [[n, u.value]]);
506
+ };
507
+ }
508
+ }), [["__scopeId", "data-v-ec9e589d"]]), V = ["element-loading-background"], H = "#ff4d4f", U = "#52c41a", W = /* @__PURE__ */ e(/* @__PURE__ */ f({
509
+ __name: "YCServiceSummaryGeologyRefineAnalysis",
510
+ props: [
511
+ "appKey",
512
+ "appSalt",
513
+ "baseHttp",
514
+ "interfaceBaseHttp",
515
+ "onlyofficeCallbackUrl",
516
+ "username",
517
+ "password",
518
+ "ids",
519
+ "theme"
520
+ ],
521
+ setup(e) {
522
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
523
+ let e = o.value;
524
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
525
+ };
526
+ _(() => {
527
+ p(), window.addEventListener("resize", x);
528
+ }), g(() => {
529
+ window.removeEventListener("resize", x), l && l.dispose();
530
+ });
531
+ let p = async () => {
532
+ let e = t.ids?.data;
533
+ if (!e?.id) {
534
+ console.warn("[YCServiceSummaryGeologyRefineAnalysis] ids.data 未配置");
535
+ return;
536
+ }
537
+ u.value = !0;
538
+ try {
539
+ let r = (await n({
540
+ appKey: t.appKey,
541
+ appSalt: t.appSalt,
542
+ id: e.id,
543
+ variables: {},
544
+ baseHttp: t.baseHttp,
545
+ reqType: e.reqType,
546
+ isFormData: e.isFormData
547
+ }))?.data?.result?.ds;
548
+ if (typeof r == "string") try {
549
+ r = JSON.parse(r);
550
+ } catch {
551
+ r = null;
552
+ }
553
+ let a = Array.isArray(r) ? r : r?.data || [], o = 0, s = 0;
554
+ a.forEach((e) => {
555
+ let t = e.dzzhds || [];
556
+ o += t.length, t.forEach((e) => {
557
+ h(e) && s++;
558
+ });
559
+ }), i.value = [{
560
+ value: o - s,
561
+ name: "正常",
562
+ itemStyle: { color: U }
563
+ }, {
564
+ value: s,
565
+ name: "报警",
566
+ itemStyle: { color: H }
567
+ }], await m(), b();
568
+ } catch (e) {
569
+ console.error("[YCServiceSummaryGeologyRefineAnalysis] 实况数据加载失败", e);
570
+ } finally {
571
+ u.value = !1;
572
+ }
573
+ }, h = (e) => e?.iswarnpre === 1 || e?.iswarnpre_6 === 1, b = () => {
574
+ if (!o.value) return;
575
+ let e = f();
576
+ l ||= T.init(o.value), l.setOption({
577
+ tooltip: {
578
+ trigger: "item",
579
+ formatter: (e) => `${e?.name ?? ""}: ${e?.value ?? 0}个`
580
+ },
581
+ series: [{
582
+ type: "pie",
583
+ radius: ["30%", "65%"],
584
+ center: ["50%", "50%"],
585
+ label: {
586
+ show: !0,
587
+ position: "outside",
588
+ fontSize: 11,
589
+ color: e,
590
+ formatter: "{b}"
591
+ },
592
+ labelLine: {
593
+ length: 10,
594
+ length2: 8
595
+ },
596
+ data: i.value
597
+ }]
598
+ });
599
+ };
600
+ C(() => t.theme, async () => {
601
+ await m(), b();
602
+ });
603
+ let x = () => {
604
+ l?.resize();
605
+ };
606
+ return (e, t) => {
607
+ let n = r;
608
+ return w((v(), s("div", {
609
+ class: "YCServiceSummaryGeologyRefineAnalysis",
610
+ "element-loading-background": d.value,
611
+ "element-loading-text": "加载中"
612
+ }, [c("div", {
613
+ class: "YCServiceSummaryGeologyRefineAnalysis-chart",
614
+ ref_key: "chartRef",
615
+ ref: o
616
+ }, null, 512)], 8, V)), [[n, u.value]]);
617
+ };
618
+ }
619
+ }), [["__scopeId", "data-v-faed9df7"]]), G = ["element-loading-background"], pe = "#ff4d4f", K = "#52c41a", me = /* @__PURE__ */ e(/* @__PURE__ */ f({
620
+ __name: "YCServiceSummaryGeologyTrafficAnalysis",
621
+ props: [
622
+ "appKey",
623
+ "appSalt",
624
+ "baseHttp",
625
+ "interfaceBaseHttp",
626
+ "onlyofficeCallbackUrl",
627
+ "username",
628
+ "password",
629
+ "ids",
630
+ "theme"
631
+ ],
632
+ setup(e) {
633
+ let t = e, i = y([]), o = y(null), l = null, u = y(!1), d = a(() => t.theme === "dark" ? "rgba(8, 22, 30, 0.55)" : "rgba(255, 255, 255, 0.7)"), f = () => {
634
+ let e = o.value;
635
+ return e && getComputedStyle(e).getPropertyValue("--yc-chart-label").trim() || "#333";
636
+ };
637
+ _(() => {
638
+ p(), window.addEventListener("resize", S);
639
+ }), g(() => {
640
+ window.removeEventListener("resize", S), l && l.dispose();
641
+ });
642
+ let p = async () => {
643
+ let e = t.ids?.geologyShortTerm;
644
+ if (!e?.id) {
645
+ console.warn("[YCServiceSummaryGeologyTrafficAnalysis] ids.geologyShortTerm 未配置");
646
+ return;
647
+ }
648
+ u.value = !0;
649
+ try {
650
+ let r = (await n({
651
+ appKey: t.appKey,
652
+ appSalt: t.appSalt,
653
+ id: e.id,
654
+ variables: {},
655
+ baseHttp: t.baseHttp,
656
+ reqType: e.reqType,
657
+ isFormData: e.isFormData
658
+ }))?.data?.result?.ds;
659
+ if (typeof r == "string") try {
660
+ r = JSON.parse(r);
661
+ } catch {
662
+ r = null;
663
+ }
664
+ i.value = (Array.isArray(r) ? r : []).map((e) => {
665
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? pe : K;
666
+ return {
667
+ value: 1,
668
+ name: e.name,
669
+ itemStyle: { color: n },
670
+ warnTags: b(t)
671
+ };
672
+ }), await m(), x();
673
+ } catch (e) {
674
+ console.error("[YCServiceSummaryGeologyTrafficAnalysis] 预报数据加载失败", e);
675
+ } finally {
676
+ u.value = !1;
677
+ }
678
+ }, h = (e) => {
679
+ let t = e.pointflds || [];
680
+ return {
681
+ iswarnpre1h: t.some((e) => e?.iswarnpre1h === 1) ? 1 : 0,
682
+ iswarnpre2h: t.some((e) => e?.iswarnpre2h === 1) ? 1 : 0,
683
+ iswarnpre3h: t.some((e) => e?.iswarnpre3h === 1) ? 1 : 0
684
+ };
685
+ }, b = (e) => {
686
+ let t = [];
687
+ return e.iswarnpre1h === 1 && t.push("未来R1h"), e.iswarnpre2h === 1 && t.push("未来R2h"), e.iswarnpre3h === 1 && t.push("未来R3h"), t;
688
+ }, x = () => {
689
+ if (!o.value) return;
690
+ let e = f();
691
+ l ||= T.init(o.value), l.setOption({
692
+ tooltip: {
693
+ trigger: "item",
694
+ formatter: (e) => {
695
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || K;
696
+ return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
697
+ }
698
+ },
699
+ series: [{
700
+ type: "pie",
701
+ radius: ["30%", "65%"],
702
+ center: ["50%", "50%"],
703
+ label: {
704
+ show: !0,
705
+ position: "outside",
706
+ fontSize: 11,
707
+ color: e,
708
+ formatter: "{b}"
709
+ },
710
+ labelLine: {
711
+ length: 10,
712
+ length2: 8
713
+ },
714
+ data: i.value
715
+ }]
716
+ });
717
+ };
718
+ C(() => t.theme, async () => {
719
+ await m(), x();
720
+ });
721
+ let S = () => {
722
+ l?.resize();
723
+ };
724
+ return (e, t) => {
725
+ let n = r;
726
+ return w((v(), s("div", {
727
+ class: "YCServiceSummaryGeologyTrafficAnalysis",
728
+ "element-loading-background": d.value,
729
+ "element-loading-text": "加载中"
730
+ }, [c("div", {
731
+ class: "YCServiceSummaryGeologyTrafficAnalysis-chart",
732
+ ref_key: "chartRef",
733
+ ref: o
734
+ }, null, 512)], 8, G)), [[n, u.value]]);
735
+ };
736
+ }
737
+ }), [["__scopeId", "data-v-32323a02"]]), he = { class: "YCServiceSummary-themeToggle" }, q = { class: "YCServiceSummary-left" }, ge = { class: "YCServiceSummary-statPanel" }, _e = { class: "YCServiceSummary-statPanel-content" }, J = ["onClick"], Y = { class: "YCServiceSummary-statCard-label" }, ve = { class: "YCServiceSummary-statCard-list" }, X = { class: "value" }, Z = { class: "YCServiceSummary-aiPanel" }, Q = { class: "YCServiceSummary-aiPanel-head" }, $ = { class: "YCServiceSummary-aiPanel-title" }, ye = { class: "YCServiceSummary-aiPanel-summary" }, be = {
738
+ key: 0,
739
+ class: "YCServiceSummary-aiPanel-charts"
740
+ }, xe = { class: "YCServiceSummary-aiPanel-chartItem" }, Se = { class: "YCServiceSummary-aiPanel-chartItem" }, Ce = {
741
+ key: 1,
742
+ class: "YCServiceSummary-aiPanel-charts"
743
+ }, we = { class: "YCServiceSummary-aiPanel-chartItem" }, Te = { class: "YCServiceSummary-aiPanel-chartItem" }, Ee = { class: "YCServiceSummary-material" }, De = { class: "YCServiceSummary-material-head" }, Oe = { class: "YCServiceSummary-material-title" }, ke = { class: "YCServiceSummary-material-actions" }, Ae = { class: "YCServiceSummary-material-body" }, je = ["src", "alt"], Me = { class: "YCServiceSummary-right" }, Ne = /* @__PURE__ */ e(/* @__PURE__ */ f({
744
+ __name: "YCServiceSummary",
745
+ props: [
746
+ "appKey",
747
+ "appSalt",
748
+ "baseHttp",
749
+ "interfaceBaseHttp",
750
+ "onlyofficeCallbackUrl",
751
+ "username",
752
+ "password",
753
+ "ids",
754
+ "showEditBtn"
755
+ ],
756
+ setup(e) {
757
+ let t = e, r = y([]), l = y(0), f = a(() => r.value[l.value]?.title || ""), m = a(() => r.value[l.value]?.warnInfo || ""), g = y(!1), S = a(() => t.showEditBtn != null && t.showEditBtn !== !1), w = y([]), T = y("交通气象服务材料"), E = (e) => e && (e.split("/").pop() || "").replace(/\.[^.]+$/, "") || "交通气象服务材料", D = (e) => !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
758
+ label: e.includes(":") ? e : `${e}:`,
759
+ value: String(t)
760
+ })), O = () => {
761
+ let e = r.value[l.value];
762
+ e && (w.value = e.imgUrl ? String(e.imgUrl).split(",").map((e) => e.trim()).filter(Boolean) : [], T.value = E(e.workUrl));
763
+ };
764
+ C(l, () => {
765
+ O();
766
+ });
767
+ let k = async () => {
768
+ let e = t.ids?.baseData;
769
+ if (!e?.id) {
770
+ console.warn("[YCServiceSummary] ids.baseData 未配置");
771
+ return;
772
+ }
773
+ try {
774
+ let i = (await n({
775
+ appKey: t.appKey,
776
+ appSalt: t.appSalt,
777
+ id: e.id,
778
+ variables: {},
779
+ baseHttp: t.baseHttp,
780
+ reqType: e.reqType,
781
+ isFormData: e.isFormData
782
+ }))?.data?.result?.output;
783
+ if (!Array.isArray(i) || i.length === 0) {
784
+ console.warn("[YCServiceSummary] baseData 返回为空");
785
+ return;
786
+ }
787
+ r.value = i.map((e) => ({
788
+ title: e.分类 || "",
789
+ rows: D(e.数据),
790
+ warnInfo: e.预警信息 || "",
791
+ workUrl: e.workUrl || "",
792
+ imgUrl: e.imgUrl || ""
793
+ })), l.value = 0, O();
794
+ } catch (e) {
795
+ console.error("[YCServiceSummary] baseData 加载失败", e);
796
+ }
797
+ };
798
+ _(() => {
799
+ k();
800
+ });
801
+ let A = (e) => {
802
+ console.log(`[YCServiceSummary] material action: ${e}`);
803
+ };
804
+ return (e, n) => (v(), s("div", { class: h(["YCServiceSummary", { "is-dark": g.value }]) }, [
805
+ c("div", he, [c("button", {
806
+ class: h(["YCServiceSummary-themeBtn", { "is-active": !g.value }]),
807
+ onClick: n[0] ||= (e) => g.value = !1,
808
+ title: "浅色"
809
+ }, [...n[4] ||= [c("svg", {
810
+ viewBox: "0 0 24 24",
811
+ width: "12",
812
+ height: "12",
813
+ fill: "currentColor"
814
+ }, [c("path", { d: "M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V22h-2v5.45zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z" })], -1), u(" 浅色 ", -1)]], 2), c("button", {
815
+ class: h(["YCServiceSummary-themeBtn", { "is-active": g.value }]),
816
+ onClick: n[1] ||= (e) => g.value = !0,
817
+ title: "深色"
818
+ }, [...n[5] ||= [c("svg", {
819
+ viewBox: "0 0 24 24",
820
+ width: "12",
821
+ height: "12",
822
+ fill: "currentColor"
823
+ }, [c("path", { d: "M9 2c-1.05 0-2.05.16-3 .46 1.69 1.2 2.86 3.06 2.86 5.21 0 3.58-2.9 6.48-6.48 6.48-.63 0-1.25-.09-1.83-.26.52 2.64 2.28 4.85 4.59 5.93C7.21 21.22 9.46 22 12 22c5.52 0 10-4.48 10-10S17.52 2 12 2c-1 0-1.97.15-2.89.42C8.43 2.15 8.73 2 9 2z" })], -1), u(" 深色 ", -1)]], 2)]),
824
+ c("div", q, [
825
+ c("div", ge, [n[7] ||= c("div", { class: "YCServiceSummary-statPanel-title" }, "宜春气象服务", -1), c("div", _e, [(v(!0), s(i, null, b(r.value, (e, t) => (v(), s("div", {
826
+ key: e.title,
827
+ class: h(["YCServiceSummary-statCard", { "is-active": l.value === t }]),
828
+ onClick: (e) => l.value = t
829
+ }, [c("div", Y, [n[6] ||= c("span", { class: "dot" }, null, -1), u(" " + x(e.title), 1)]), c("div", ve, [(v(!0), s(i, null, b(e.rows, (e) => (v(), s("div", {
830
+ key: e.label,
831
+ class: "row"
832
+ }, [c("span", null, x(e.label), 1), c("span", X, x(e.value), 1)]))), 128))])], 10, J))), 128))])]),
833
+ c("div", Z, [
834
+ c("div", Q, [c("div", $, [n[8] ||= c("span", { class: "icon" }, null, -1), u(" " + x(f.value) + " AI 分析 ", 1)])]),
835
+ n[13] ||= c("div", { class: "YCServiceSummary-aiPanel-warningTitle" }, "预警信号", -1),
836
+ c("div", ye, x(m.value), 1),
837
+ f.value === "公路气象服务" ? (v(), s("div", be, [c("div", xe, [n[9] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路实况状态", -1), d(I, p(t, { theme: g.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Se, [n[10] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路预报状态", -1), d(B, p(t, { theme: g.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
838
+ f.value === "地质灾害风险分析服务" ? (v(), s("div", Ce, [c("div", we, [n[11] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害实况报警", -1), d(W, p(t, { theme: g.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Te, [n[12] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害预报报警", -1), d(me, p(t, { theme: g.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0)
839
+ ]),
840
+ c("div", Ee, [c("div", De, [c("span", Oe, x(T.value), 1), c("div", ke, [S.value ? (v(), s("button", {
841
+ key: 0,
842
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--edit",
843
+ onClick: n[2] ||= (e) => A("edit")
844
+ }, [...n[14] ||= [c("svg", {
845
+ viewBox: "0 0 24 24",
846
+ width: "12",
847
+ height: "12",
848
+ fill: "currentColor"
849
+ }, [c("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" })], -1), u(" 编辑 ", -1)]])) : o("", !0), c("button", {
850
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--download",
851
+ onClick: n[3] ||= (e) => A("download")
852
+ }, [...n[15] ||= [c("svg", {
853
+ viewBox: "0 0 24 24",
854
+ width: "12",
855
+ height: "12",
856
+ fill: "currentColor"
857
+ }, [c("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" })], -1), u(" 下载 ", -1)]])])]), c("div", Ae, [(v(!0), s(i, null, b(w.value, (e, t) => (v(), s("img", {
858
+ key: t,
859
+ class: "YCServiceSummary-material-image",
860
+ src: e,
861
+ alt: T.value
862
+ }, null, 8, je))), 128))])])
863
+ ]),
864
+ c("div", Me, [d(M, p(t, { theme: g.value ? "dark" : "light" }), null, 16, ["theme"])])
865
+ ], 2));
866
+ }
867
+ }), [["__scopeId", "data-v-81893f07"]]);
868
+ //#endregion
869
+ export { Ne as t };