nxd-plugin 1.8.50 → 1.8.51

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.
@@ -3,17 +3,19 @@ import { ElLoadingDirective as r } from "element-plus/es";
3
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
4
  import * as T from "echarts";
5
5
  import E from "axios";
6
+ import { ElMessage as D } from "element-plus";
7
+ import "element-plus/es/components/message/style/css";
6
8
  //#region src/components/YCServiceSummary/YCAIChatPanel.vue?vue&type=script&setup=true&lang.ts
7
- var D = { class: "YCAIChatPanel" }, O = {
9
+ var O = { class: "YCAIChatPanel" }, k = {
8
10
  key: 0,
9
11
  class: "YCAIChatPanel-message-avatar"
10
- }, k = { class: "YCAIChatPanel-message-body" }, ee = {
12
+ }, A = { class: "YCAIChatPanel-message-body" }, ee = {
11
13
  key: 0,
12
14
  class: "YCAIChatPanel-message-line"
13
- }, A = ["innerHTML"], j = {
15
+ }, j = ["innerHTML"], M = {
14
16
  key: 0,
15
17
  class: "YCAIChatPanel-subMenu"
16
- }, M = ["onClick"], N = ["src"], P = { class: "YCAIChatPanel-footer" }, F = { class: "YCAIChatPanel-mainMenu" }, te = ["onClick"], ne = { class: "YCAIChatPanel-inputBar" }, re = ["placeholder"], ie = ["disabled"], I = 2e3, ae = 300 * 1e3, oe = "正在思考...", se = "做材料", L = /* @__PURE__ */ n(/* @__PURE__ */ f({
18
+ }, te = ["onClick"], N = ["src"], P = { class: "YCAIChatPanel-footer" }, ne = { class: "YCAIChatPanel-mainMenu" }, F = ["onClick"], re = { class: "YCAIChatPanel-inputBar" }, ie = ["placeholder"], ae = ["disabled"], oe = 2e3, se = 300 * 1e3, ce = "正在思考...", le = "做材料", I = /* @__PURE__ */ n(/* @__PURE__ */ f({
17
19
  __name: "YCAIChatPanel",
18
20
  props: [
19
21
  "appKey",
@@ -31,25 +33,25 @@ var D = { class: "YCAIChatPanel" }, O = {
31
33
  "查数据",
32
34
  "查知识",
33
35
  "查材料"
34
- ], d = y(null), f = y(null), p = y(""), C = y(!1), T = y(""), L = y(""), R = y(null), z = y([]), B = y(r.appKey || ""), V = null, H = y([{
36
+ ], d = y(null), f = y(null), p = y(""), C = y(!1), T = y(""), D = y(""), I = y(null), L = y([]), R = y(r.appKey || ""), z = null, B = y([{
35
37
  role: "ai",
36
38
  content: "已接入实况与预报数据,请问需要什么帮助?",
37
39
  status: "end"
38
- }]), U = a(() => z.value.length ? z.value.map((e) => ({
40
+ }]), V = a(() => L.value.length ? L.value.map((e) => ({
39
41
  key: e.label,
40
42
  label: e.label
41
43
  })) : u.map((e) => ({
42
44
  key: e,
43
45
  label: e
44
- }))), W = a(() => T.value && z.value.find((e) => e.label === T.value)?.list || []), ce = a(() => !!T.value && !!p.value.trim() && !C.value), G = a(() => T.value ? "请输入问题" : "请先选择类别"), K = a(() => r.theme === "dark" ? new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAACVBMVEVHcEz////////mcEUwAAAAAnRSTlMAfVgnwLkAAAD9SURBVHja7dmhDcMwAETRJmoNwks8QqcwLgrpEpnGuCjAJDdlyVXFH4RUd/yDF8WSJV+yLMuyLDtxtxUn26DFLDWYFKnDZJEGTKp08ESNJ50mGFOEMUUYM4ljNo6pwQQTTDDBBBNMMMEEE0wwp2KuK8Y8DoqZpAYxs9QBxvUOMYs0AIYkxpDEGJIYQxJjUGIMSYwhiTEkMQYlxjghGCcE44RgnCCME4JxQjBOCMYJwjghGCcE44RgnBDM0wnAvJ0AjFhSeVJ4MqHEGJ5UnhSeTE4wZiC5QDILJwtPKk+2P0oe+m3nX6yDH9Jr6HSJXBnvr+/WPANlWZZl2Y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JXvsQJI9XiNFIsr+NCLKfVaiRSLKvnQiyj1PIUUiy3dYyQbbzMsIJASRZbxSCrPMZ4iqSLLcZQZbZDHUFSebbjSDzXIY8W1OSKAARJEonK+2joiSVKuqbxpwgfXGwuhBAEqFwDQS5cuD5iQCSXIEgyJUDzzMEkOR0QpCZG4NTdwKjS4Ig93uBowUCI0sykiAL7ef0HgKjSoIge+4OxlwIjCgJglxaH+fpfD7Lt8h+pFf5kszqkUiZ/TaoVFv1B4JUR9onYRJCvmZZvjBTbmCTX0bTh8yxVRHkGD9Ls0UOxKjcEQSpArRvkvTp8da3grirI4jz3iY55FNDfqxyvhOb5SOIzb7kVCWC5IxnbAYBBMmAxdDxCCCI/55/+t/CZQcm94Egl94YftooLf3xzuSNtVH2r8tW94Egv1rl8sS7y6rvRZutH0HuTXJ7lP73lV/zmr3JNsC+T/VvDOtzGUH6cK++6nSTeZPEtBzSJAQRCkFCJEnxT9rOnxQii9X4I3WmkE++VKrdB4LY7U1xZenG+0zxthUdr7v5xQKCFN+GTByBAIKM0GX2WEwAQYrRMXEEAggyQpfZYzEBBClGx8QVAmEuIUiYVrIRDQIIokGVnGEIIEiYVrIRDQIIokGVnGEIIEiYVo6ykbb7RJC2vFnNGQEEcdYwym1LAEHa8mY1ZwQQxFnDKLctAQRpy5vVLBOYqQ1BZqBwCgI3AghyI8ErBGYIIMgMFE5B4EYAQW4keIXADAEEmYHCKQjcCNQS5JaPVwiEIoAgodrJZmoTQJDaRMkXigCChGonm6lNAEFqEyVfKAIOBAnFm804I4AgzhpGuW0JIEhb3qzmjACCOGsY5bYlgCBtebOaMwJjC+KsWZTbngCCtGfOio4IIIijZlFqewII0p45KzoigCCOmkWp7QkgiBJz0sYg8D8AAAD//4ilig4AAAAGSURBVAMApWADvoP0hDEAAAAASUVORK5CYII=", "" + import.meta.url).href);
46
+ }))), ue = a(() => T.value && L.value.find((e) => e.label === T.value)?.list || []), H = a(() => !!T.value && !!p.value.trim() && !C.value), de = a(() => T.value ? "请输入问题" : "请先选择类别"), fe = 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,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAIwElEQVR4AeydbXYiOQwA2T0Pd9jMyZKcLDlE7pO1oBkI6S+7LVuSax6CptuW5VLXkJf84N8T/yAAgUUCCLKIhgsQOJ0QhLsAAisEEGQFDpcggCDcAxBYIaAoyMqqXIKAEwII4qRRlNmHAIL04c6qTgggiJNGUWYfAgjShzurOiHgUxAncCnTPwEE8d9DdqBIAEEU4ZLaPwEE8d9DdqBIAEEU4ZLaPwEEeeohbyHwSABBHmlwDIEnAgjyBIS3EHgkgCCPNDiGwBMBBHkCwlsIPBJAkEcausdkd0gAQRw2jZLbEUCQdqxZySEBBHHYNEpuRwBB2rFmJYcEEMRh036XzBktAgiiRZa8IQggSIg2sgktAgiiRZa8IQggSIg2sgktAgiiRTZK3sH3gSCD3wBsf50Agqzz4ergBBBk8BuA7a8TQJB1PlwdnACCDH4D9Ny+h7URxEOXqLEbATeCnM/nlxRvU7x0I8bCQxEwL8gkxHfqykeK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Gx8QVAmEuIUiYVrIRDQIIokGVnGEIIEiYVrIRDQIIokGVnGEIIEiYVo6ykbb7RJC2vFnNGQEEcdYwym1LAEHa8mY1ZwQQxFnDKLctAQRpy5vVLBOYqQ1BZqBwCgI3AghyI8ErBGYIIMgMFE5B4EYAQW4keIXADAEEmYHCKQjcCNQS5JaPVwiEIoAgodrJZmoTQJDaRMkXigCChGonm6lNAEFqEyVfKAIOBAnFm804I4AgzhpGuW0JIEhb3qzmjACCOGsY5bYlgCBtebOaMwJjC+KsWZTbngCCtGfOio4IIIijZlFqewII0p45KzoigCCOmkWp7QkgiBJz0sYg8D8AAAD//4ilig4AAAAGSURBVAMApWADvoP0hDEAAAAASUVORK5CYII=", "" + import.meta.url).href);
45
47
  _(() => {
46
- q();
48
+ U();
47
49
  }), g(() => {
48
- Q();
50
+ Z();
49
51
  });
50
- let q = async () => {
51
- await le(), await ue(), !T.value && U.value.length && Y(U.value[0].key);
52
- }, le = async () => {
52
+ let U = async () => {
53
+ await W(), await G(), !T.value && V.value.length && K(V.value[0].key);
54
+ }, W = async () => {
53
55
  if (!r.username || !r.password) {
54
56
  console.warn("[YCAIChatPanel] 未配置 username/password,跳过登录");
55
57
  return;
@@ -60,11 +62,11 @@ var D = { class: "YCAIChatPanel" }, O = {
60
62
  password: r.password,
61
63
  validToken: "SLIDER_external"
62
64
  }), n = t.data?.data?.token || t.data?.token || "";
63
- n && (B.value = n);
65
+ n && (R.value = n);
64
66
  } catch (e) {
65
67
  console.error("[YCAIChatPanel] 登录失败:", e);
66
68
  }
67
- }, J = (e) => Array.isArray(e) ? e : !e || typeof e != "object" ? null : e.output ?? e.list ?? e.items ?? e.children ?? e.data ?? e.records ?? null, ue = async () => {
69
+ }, pe = (e) => Array.isArray(e) ? e : !e || typeof e != "object" ? null : e.output ?? e.list ?? e.items ?? e.children ?? e.data ?? e.records ?? null, G = async () => {
68
70
  let t = r.ids?.subMenu;
69
71
  if (!t?.id) {
70
72
  console.warn("[YCAIChatPanel] 未配置 subMenu 工作流 id");
@@ -85,15 +87,15 @@ var D = { class: "YCAIChatPanel" }, O = {
85
87
  } catch {
86
88
  i = null;
87
89
  }
88
- let a = J(i);
90
+ let a = pe(i);
89
91
  if (typeof a == "string") try {
90
92
  a = JSON.parse(a);
91
93
  } catch {
92
94
  a = null;
93
95
  }
94
- if (a = J(a) || a, !Array.isArray(a) || !a.length) return;
95
- z.value = a.map((e) => {
96
- let t = J(e) || e?.list || [];
96
+ if (a = pe(a) || a, !Array.isArray(a) || !a.length) return;
97
+ L.value = a.map((e) => {
98
+ let t = pe(e) || e?.list || [];
97
99
  return {
98
100
  label: (e.label || e.name || e.title || "").trim(),
99
101
  list: (t || []).map((e) => ({
@@ -102,37 +104,37 @@ var D = { class: "YCAIChatPanel" }, O = {
102
104
  id: e.id
103
105
  }))
104
106
  };
105
- }).filter((e) => e.label && e.label !== se);
107
+ }).filter((e) => e.label && e.label !== le);
106
108
  } catch (e) {
107
109
  console.error("[YCAIChatPanel] 获取菜单失败:", e);
108
110
  }
109
- }, Y = (e) => {
110
- T.value = e, L.value = e, R.value = null, p.value = "", m(() => $());
111
- }, de = (e) => {
112
- R.value = e, p.value = e.content || "", m(() => {
113
- $(), d.value?.focus();
111
+ }, K = (e) => {
112
+ T.value = e, D.value = e, I.value = null, p.value = "", m(() => Q());
113
+ }, q = (e) => {
114
+ I.value = e, p.value = e.content || "", m(() => {
115
+ Q(), d.value?.focus();
114
116
  });
115
- }, fe = (e) => t(e || "").replace(/>\n+</g, "><"), pe = async () => {
116
- let e = p.value.trim(), t = T.value || L.value;
117
+ }, me = (e) => t(e || "").replace(/>\n+</g, "><"), J = async () => {
118
+ let e = p.value.trim(), t = T.value || D.value;
117
119
  if (!(!e || !t || C.value)) {
118
- T.value = t, L.value = t, C.value = !0, H.value.push({
120
+ T.value = t, D.value = t, C.value = !0, B.value.push({
119
121
  role: "user",
120
122
  content: e,
121
123
  status: "end"
122
- }), H.value.push({
124
+ }), B.value.push({
123
125
  role: "ai",
124
- content: oe,
126
+ content: ce,
125
127
  status: "thinking"
126
128
  }), p.value = "", m(() => {
127
- $(), _e();
128
- }), Q();
129
+ Q(), ve();
130
+ }), Z();
129
131
  try {
130
- R.value?.id ? await me(e, R.value.id) : await he(e);
132
+ I.value?.id ? await he(e, I.value.id) : await ge(e);
131
133
  } catch (e) {
132
- console.error("[YCAIChatPanel] 发送失败:", e), Z("请求失败,请稍后重试", "error"), C.value = !1;
134
+ console.error("[YCAIChatPanel] 发送失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
133
135
  }
134
136
  }
135
- }, me = async (t, n) => {
137
+ }, he = async (t, n) => {
136
138
  try {
137
139
  let i = await e({
138
140
  appKey: r.appKey,
@@ -143,37 +145,37 @@ var D = { class: "YCAIChatPanel" }, O = {
143
145
  reqType: "post",
144
146
  isFormData: !1
145
147
  }), a = i?.data?.result || i?.data;
146
- Z((typeof a?.output == "string" ? a.output : "") || "暂无返回结果");
148
+ Y((typeof a?.output == "string" ? a.output : "") || "暂无返回结果");
147
149
  } catch (e) {
148
- console.error("[YCAIChatPanel] 工作流请求失败:", e), Z("请求失败,请稍后重试", "error");
150
+ console.error("[YCAIChatPanel] 工作流请求失败:", e), Y("请求失败,请稍后重试", "error");
149
151
  } finally {
150
152
  C.value = !1;
151
153
  }
152
- }, he = async (e) => {
154
+ }, ge = async (e) => {
153
155
  let t = (r.interfaceBaseHttp || "").replace(/\/$/, "");
154
156
  if (!t) {
155
- Z("未配置 interfaceBaseHttp", "error"), C.value = !1;
157
+ Y("未配置 interfaceBaseHttp", "error"), C.value = !1;
156
158
  return;
157
159
  }
158
160
  let n = {};
159
- B.value && (n["aiflowy-token"] = B.value);
161
+ R.value && (n["aiflowy-token"] = R.value);
160
162
  let i = Date.now();
161
163
  try {
162
164
  let r = (await E.post(`${t}/chat`, { content: e }, { headers: n })).data;
163
165
  if (r?.errorCode !== void 0 && r?.errorCode !== 0 && r?.errorCode !== 200) throw Error(r?.message || "提交问题失败");
164
166
  let a = r?.data?.taskId, o = r?.data?.intentName || "", s = r?.data?.status;
165
167
  if (!a) throw Error("未获取到 taskId");
166
- if (o && ge(`正在思考【${o}】...`), s === "done") {
167
- await X(a, t, n, i);
168
+ if (o && X(`正在思考【${o}】...`), s === "done") {
169
+ await _e(a, t, n, i);
168
170
  return;
169
171
  }
170
- V = setTimeout(() => X(a, t, n, i), I);
172
+ z = setTimeout(() => _e(a, t, n, i), oe);
171
173
  } catch (e) {
172
- console.error("[YCAIChatPanel] mobileBot 对话失败:", e), Z("请求失败,请稍后重试", "error"), C.value = !1;
174
+ console.error("[YCAIChatPanel] mobileBot 对话失败:", e), Y("请求失败,请稍后重试", "error"), C.value = !1;
173
175
  }
174
- }, X = async (e, t, n, r) => {
175
- if (Date.now() - r > ae) {
176
- Z("查询超时,请稍后重试", "error"), C.value = !1, Q();
176
+ }, _e = async (e, t, n, r) => {
177
+ if (Date.now() - r > se) {
178
+ Y("查询超时,请稍后重试", "error"), C.value = !1, Z();
177
179
  return;
178
180
  }
179
181
  try {
@@ -181,91 +183,91 @@ var D = { class: "YCAIChatPanel" }, O = {
181
183
  if (i?.errorCode !== void 0 && i?.errorCode !== 0 && i?.errorCode !== 200) throw Error(i?.message || "查询结果失败");
182
184
  let a = i?.data || {}, o = a.status, s = a.markdown;
183
185
  if (o === "running") {
184
- V = setTimeout(() => X(e, t, n, r), I);
186
+ z = setTimeout(() => _e(e, t, n, r), oe);
185
187
  return;
186
188
  }
187
189
  if (o === "fail") {
188
- Z(s || "查询失败", "error"), C.value = !1, Q();
190
+ Y(s || "查询失败", "error"), C.value = !1, Z();
189
191
  return;
190
192
  }
191
- Z(s || ""), C.value = !1, Q();
193
+ Y(s || ""), C.value = !1, Z();
192
194
  } catch (e) {
193
- console.error("[YCAIChatPanel] 轮询结果失败:", e), Z("查询结果失败,请稍后重试", "error"), C.value = !1, Q();
195
+ console.error("[YCAIChatPanel] 轮询结果失败:", e), Y("查询结果失败,请稍后重试", "error"), C.value = !1, Z();
194
196
  }
195
- }, Z = (e, t = "end") => {
196
- H.value.push({
197
+ }, Y = (e, t = "end") => {
198
+ B.value.push({
197
199
  role: "ai",
198
200
  content: e,
199
201
  status: t
200
- }), _e();
201
- }, ge = (e) => {
202
- let t = H.value[H.value.length - 1];
203
- !t || t.role !== "ai" || t.status !== "thinking" || (t.content = e, _e());
204
- }, Q = () => {
205
- V &&= (clearTimeout(V), null);
206
- }, _e = async () => {
202
+ }), ve();
203
+ }, X = (e) => {
204
+ let t = B.value[B.value.length - 1];
205
+ !t || t.role !== "ai" || t.status !== "thinking" || (t.content = e, ve());
206
+ }, Z = () => {
207
+ z &&= (clearTimeout(z), null);
208
+ }, ve = async () => {
207
209
  await m();
208
210
  let e = f.value;
209
211
  e && (e.scrollTop = e.scrollHeight);
210
- }, $ = () => {
212
+ }, Q = () => {
211
213
  let e = d.value;
212
214
  if (!e) return;
213
215
  e.style.height = "auto", e.style.overflowY = "hidden";
214
216
  let t = Math.min(e.scrollHeight, 300);
215
217
  e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > 300 ? "auto" : "hidden";
216
- }, ve = (e) => {
217
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), pe());
218
+ }, $ = (e) => {
219
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), J());
218
220
  };
219
- return (e, t) => (v(), s("div", D, [
221
+ return (e, t) => (v(), s("div", O, [
220
222
  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
223
  c("div", {
222
224
  class: "YCAIChatPanel-messages",
223
225
  ref_key: "messagesRef",
224
226
  ref: f
225
- }, [(v(!0), s(i, null, b(H.value, (e, n) => (v(), s("div", {
227
+ }, [(v(!0), s(i, null, b(B.value, (e, n) => (v(), s("div", {
226
228
  key: n,
227
229
  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", ee, x(e.content), 1)) : (v(), s("div", {
230
+ }, [e.role === "ai" ? (v(), s("div", k, [...t[1] ||= [c("span", null, "AI", -1)]])) : o("", !0), c("div", A, [e.role === "user" ? (v(), s("div", ee, x(e.content), 1)) : (v(), s("div", {
229
231
  key: 1,
230
232
  class: "YCAIChatPanel-message-line",
231
- innerHTML: fe(e.content)
232
- }, null, 8, A))])], 2))), 128))], 512),
233
- W.value.length ? (v(), s("div", j, [(v(!0), s(i, null, b(W.value, (e) => (v(), s("div", {
233
+ innerHTML: me(e.content)
234
+ }, null, 8, j))])], 2))), 128))], 512),
235
+ ue.value.length ? (v(), s("div", M, [(v(!0), s(i, null, b(ue.value, (e) => (v(), s("div", {
234
236
  key: e.id || e.title,
235
237
  class: "YCAIChatPanel-subMenu-item",
236
- onClick: (t) => de(e)
238
+ onClick: (t) => q(e)
237
239
  }, [c("span", null, x(e.title), 1), c("img", {
238
240
  class: "YCAIChatPanel-subMenu-arrow",
239
- src: K.value,
241
+ src: fe.value,
240
242
  alt: ""
241
- }, null, 8, N)], 8, M))), 128))])) : o("", !0),
242
- c("div", P, [c("div", F, [(v(!0), s(i, null, b(U.value, (e) => (v(), s("button", {
243
+ }, null, 8, N)], 8, te))), 128))])) : o("", !0),
244
+ c("div", P, [c("div", ne, [(v(!0), s(i, null, b(V.value, (e) => (v(), s("button", {
243
245
  key: e.key,
244
246
  class: h(["YCAIChatPanel-mainMenu-btn", { "is-active": T.value === e.key }]),
245
- onClick: (t) => Y(e.key)
246
- }, x(e.label), 11, te))), 128))]), c("div", ne, [w(c("textarea", {
247
+ onClick: (t) => K(e.key)
248
+ }, x(e.label), 11, F))), 128))]), c("div", re, [w(c("textarea", {
247
249
  ref_key: "textareaRef",
248
250
  ref: d,
249
251
  "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
250
252
  class: "YCAIChatPanel-textarea",
251
- placeholder: G.value,
253
+ placeholder: de.value,
252
254
  rows: "1",
253
- onInput: $,
254
- onKeydown: ve
255
- }, null, 40, re), [[S, p.value]]), c("button", {
255
+ onInput: Q,
256
+ onKeydown: $
257
+ }, null, 40, ie), [[S, p.value]]), c("button", {
256
258
  class: "YCAIChatPanel-send",
257
- disabled: !ce.value,
258
- onClick: pe,
259
+ disabled: !H.value,
260
+ onClick: J,
259
261
  title: "发送"
260
262
  }, [...t[2] ||= [c("svg", {
261
263
  viewBox: "0 0 24 24",
262
264
  width: "16",
263
265
  height: "16",
264
266
  fill: "currentColor"
265
- }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, ie)])])
267
+ }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)]], 8, ae)])])
266
268
  ]));
267
269
  }
268
- }), [["__scopeId", "data-v-c958b0ae"]]), R = ["element-loading-background"], z = "#ff4d4f", B = "#52c41a", V = /* @__PURE__ */ n(/* @__PURE__ */ f({
270
+ }), [["__scopeId", "data-v-c958b0ae"]]), L = ["element-loading-background"], R = "#ff4d4f", z = "#52c41a", B = /* @__PURE__ */ n(/* @__PURE__ */ f({
269
271
  __name: "YCServiceSummaryRefineAnalysis",
270
272
  props: [
271
273
  "appKey",
@@ -311,7 +313,7 @@ var D = { class: "YCAIChatPanel" }, O = {
311
313
  r = null;
312
314
  }
313
315
  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 ? z : B;
316
+ let t = S(e), n = t.iswarnrainfall_1h || t.iswarnrainfall_6h || t.iswarntemp || t.iswarnvis ? R : z;
315
317
  return {
316
318
  value: 1,
317
319
  name: e.name,
@@ -345,7 +347,7 @@ var D = { class: "YCAIChatPanel" }, O = {
345
347
  tooltip: {
346
348
  trigger: "item",
347
349
  formatter: (e) => {
348
- let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || B;
350
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || z;
349
351
  return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
350
352
  }
351
353
  },
@@ -384,10 +386,10 @@ var D = { class: "YCAIChatPanel" }, O = {
384
386
  class: "YCServiceSummaryRefineAnalysis-chart",
385
387
  ref_key: "chartRef",
386
388
  ref: o
387
- }, null, 512)], 8, R)), [[n, u.value]]);
389
+ }, null, 512)], 8, L)), [[n, u.value]]);
388
390
  };
389
391
  }
390
- }), [["__scopeId", "data-v-118dfe5e"]]), H = ["element-loading-background"], U = "#ff4d4f", W = "#52c41a", ce = /* @__PURE__ */ n(/* @__PURE__ */ f({
392
+ }), [["__scopeId", "data-v-118dfe5e"]]), V = ["element-loading-background"], ue = "#ff4d4f", H = "#52c41a", de = /* @__PURE__ */ n(/* @__PURE__ */ f({
391
393
  __name: "YCServiceSummaryTrafficAnalysis",
392
394
  props: [
393
395
  "appKey",
@@ -433,7 +435,7 @@ var D = { class: "YCAIChatPanel" }, O = {
433
435
  r = null;
434
436
  }
435
437
  i.value = (Array.isArray(r) ? r : []).map((e) => {
436
- let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? U : W;
438
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? ue : H;
437
439
  return {
438
440
  value: 1,
439
441
  name: e.name,
@@ -463,7 +465,7 @@ var D = { class: "YCAIChatPanel" }, O = {
463
465
  tooltip: {
464
466
  trigger: "item",
465
467
  formatter: (e) => {
466
- let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || W;
468
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || H;
467
469
  return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
468
470
  }
469
471
  },
@@ -502,10 +504,10 @@ var D = { class: "YCAIChatPanel" }, O = {
502
504
  class: "YCServiceSummaryTrafficAnalysis-chart",
503
505
  ref_key: "chartRef",
504
506
  ref: o
505
- }, null, 512)], 8, H)), [[n, u.value]]);
507
+ }, null, 512)], 8, V)), [[n, u.value]]);
506
508
  };
507
509
  }
508
- }), [["__scopeId", "data-v-ec9e589d"]]), G = ["element-loading-background"], K = "#ff4d4f", q = "#52c41a", le = /* @__PURE__ */ n(/* @__PURE__ */ f({
510
+ }), [["__scopeId", "data-v-ec9e589d"]]), fe = ["element-loading-background"], U = "#ff4d4f", W = "#52c41a", pe = /* @__PURE__ */ n(/* @__PURE__ */ f({
509
511
  __name: "YCServiceSummaryGeologyRefineAnalysis",
510
512
  props: [
511
513
  "appKey",
@@ -559,11 +561,11 @@ var D = { class: "YCAIChatPanel" }, O = {
559
561
  }), i.value = [{
560
562
  value: o - s,
561
563
  name: "正常",
562
- itemStyle: { color: q }
564
+ itemStyle: { color: W }
563
565
  }, {
564
566
  value: s,
565
567
  name: "报警",
566
- itemStyle: { color: K }
568
+ itemStyle: { color: U }
567
569
  }], await m(), b();
568
570
  } catch (e) {
569
571
  console.error("[YCServiceSummaryGeologyRefineAnalysis] 实况数据加载失败", e);
@@ -613,10 +615,10 @@ var D = { class: "YCAIChatPanel" }, O = {
613
615
  class: "YCServiceSummaryGeologyRefineAnalysis-chart",
614
616
  ref_key: "chartRef",
615
617
  ref: o
616
- }, null, 512)], 8, G)), [[n, u.value]]);
618
+ }, null, 512)], 8, fe)), [[n, u.value]]);
617
619
  };
618
620
  }
619
- }), [["__scopeId", "data-v-faed9df7"]]), J = ["element-loading-background"], ue = "#ff4d4f", Y = "#52c41a", de = /* @__PURE__ */ n(/* @__PURE__ */ f({
621
+ }), [["__scopeId", "data-v-faed9df7"]]), G = ["element-loading-background"], K = "#ff4d4f", q = "#52c41a", me = /* @__PURE__ */ n(/* @__PURE__ */ f({
620
622
  __name: "YCServiceSummaryGeologyTrafficAnalysis",
621
623
  props: [
622
624
  "appKey",
@@ -662,7 +664,7 @@ var D = { class: "YCAIChatPanel" }, O = {
662
664
  r = null;
663
665
  }
664
666
  i.value = (Array.isArray(r) ? r : []).map((e) => {
665
- let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? ue : Y;
667
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? K : q;
666
668
  return {
667
669
  value: 1,
668
670
  name: e.name,
@@ -692,7 +694,7 @@ var D = { class: "YCAIChatPanel" }, O = {
692
694
  tooltip: {
693
695
  trigger: "item",
694
696
  formatter: (e) => {
695
- let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || Y;
697
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || q;
696
698
  return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
697
699
  }
698
700
  },
@@ -731,10 +733,10 @@ var D = { class: "YCAIChatPanel" }, O = {
731
733
  class: "YCServiceSummaryGeologyTrafficAnalysis-chart",
732
734
  ref_key: "chartRef",
733
735
  ref: o
734
- }, null, 512)], 8, J)), [[n, u.value]]);
736
+ }, null, 512)], 8, G)), [[n, u.value]]);
735
737
  };
736
738
  }
737
- }), [["__scopeId", "data-v-32323a02"]]), fe = ["element-loading-background"], pe = "#ff4d4f", me = "#52c41a", he = /* @__PURE__ */ n(/* @__PURE__ */ f({
739
+ }), [["__scopeId", "data-v-32323a02"]]), J = ["element-loading-background"], he = "#ff4d4f", ge = "#52c41a", _e = /* @__PURE__ */ n(/* @__PURE__ */ f({
738
740
  __name: "YCServiceSummaryReservoirRefineAnalysis",
739
741
  props: [
740
742
  "appKey",
@@ -788,11 +790,11 @@ var D = { class: "YCAIChatPanel" }, O = {
788
790
  }), i.value = [{
789
791
  value: o - s,
790
792
  name: "正常",
791
- itemStyle: { color: me }
793
+ itemStyle: { color: ge }
792
794
  }, {
793
795
  value: s,
794
796
  name: "报警",
795
- itemStyle: { color: pe }
797
+ itemStyle: { color: he }
796
798
  }], await m(), b();
797
799
  } catch (e) {
798
800
  console.error("[YCServiceSummaryReservoirRefineAnalysis] 实况数据加载失败", e);
@@ -842,10 +844,10 @@ var D = { class: "YCAIChatPanel" }, O = {
842
844
  class: "YCServiceSummaryReservoirRefineAnalysis-chart",
843
845
  ref_key: "chartRef",
844
846
  ref: o
845
- }, null, 512)], 8, fe)), [[n, u.value]]);
847
+ }, null, 512)], 8, J)), [[n, u.value]]);
846
848
  };
847
849
  }
848
- }), [["__scopeId", "data-v-8d675142"]]), X = ["element-loading-background"], Z = "#ff4d4f", ge = "#52c41a", Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
850
+ }), [["__scopeId", "data-v-8d675142"]]), Y = ["element-loading-background"], X = "#ff4d4f", Z = "#52c41a", ve = /* @__PURE__ */ n(/* @__PURE__ */ f({
849
851
  __name: "YCServiceSummaryReservoirTrafficAnalysis",
850
852
  props: [
851
853
  "appKey",
@@ -891,7 +893,7 @@ var D = { class: "YCAIChatPanel" }, O = {
891
893
  r = null;
892
894
  }
893
895
  i.value = (Array.isArray(r) ? r : []).map((e) => {
894
- let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? Z : ge;
896
+ let t = h(e), n = t.iswarnpre1h || t.iswarnpre2h || t.iswarnpre3h ? X : Z;
895
897
  return {
896
898
  value: 1,
897
899
  name: e.name,
@@ -921,7 +923,7 @@ var D = { class: "YCAIChatPanel" }, O = {
921
923
  tooltip: {
922
924
  trigger: "item",
923
925
  formatter: (e) => {
924
- let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || ge;
926
+ let t = e?.data?.warnTags || [], n = e?.data?.itemStyle?.color || Z;
925
927
  return t.length ? `${e?.name ?? ""} <span style="color:${n};">${t.join("、")}报警</span>` : `${e?.name ?? ""} <span style="color:${n};">正常</span>`;
926
928
  }
927
929
  },
@@ -960,10 +962,10 @@ var D = { class: "YCAIChatPanel" }, O = {
960
962
  class: "YCServiceSummaryReservoirTrafficAnalysis-chart",
961
963
  ref_key: "chartRef",
962
964
  ref: o
963
- }, null, 512)], 8, X)), [[n, u.value]]);
965
+ }, null, 512)], 8, Y)), [[n, u.value]]);
964
966
  };
965
967
  }
966
- }), [["__scopeId", "data-v-56bb4ef3"]]), _e = ["element-loading-background"], $ = "#ff4d4f", ve = "#52c41a", ye = /* @__PURE__ */ n(/* @__PURE__ */ f({
968
+ }), [["__scopeId", "data-v-56bb4ef3"]]), Q = ["element-loading-background"], $ = "#ff4d4f", ye = "#52c41a", be = /* @__PURE__ */ n(/* @__PURE__ */ f({
967
969
  __name: "YCServiceSummaryMiningAreaRefineAnalysis",
968
970
  props: [
969
971
  "appKey",
@@ -1016,7 +1018,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1016
1018
  return {
1017
1019
  value: 1,
1018
1020
  name: e?.name || "",
1019
- itemStyle: { color: t ? $ : ve },
1021
+ itemStyle: { color: t ? $ : ye },
1020
1022
  warn: t
1021
1023
  };
1022
1024
  }), await m(), b();
@@ -1032,7 +1034,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1032
1034
  tooltip: {
1033
1035
  trigger: "item",
1034
1036
  formatter: (e) => {
1035
- let t = e?.data?.warn, n = e?.data?.itemStyle?.color || ve;
1037
+ let t = e?.data?.warn, n = e?.data?.itemStyle?.color || ye;
1036
1038
  return `${e?.name ?? ""} <span style="color:${n};">${t ? "报警" : "正常"}</span>`;
1037
1039
  }
1038
1040
  },
@@ -1071,10 +1073,10 @@ var D = { class: "YCAIChatPanel" }, O = {
1071
1073
  class: "YCServiceSummaryMiningAreaRefineAnalysis-chart",
1072
1074
  ref_key: "chartRef",
1073
1075
  ref: o
1074
- }, null, 512)], 8, _e)), [[n, u.value]]);
1076
+ }, null, 512)], 8, Q)), [[n, u.value]]);
1075
1077
  };
1076
1078
  }
1077
- }), [["__scopeId", "data-v-42e03332"]]), be = ["element-loading-background"], xe = "#ff4d4f", Se = "#52c41a", Ce = /* @__PURE__ */ n(/* @__PURE__ */ f({
1079
+ }), [["__scopeId", "data-v-42e03332"]]), xe = ["element-loading-background"], Se = "#ff4d4f", Ce = "#52c41a", we = /* @__PURE__ */ n(/* @__PURE__ */ f({
1078
1080
  __name: "YCServiceSummaryMiningAreaTrafficAnalysis",
1079
1081
  props: [
1080
1082
  "appKey",
@@ -1127,7 +1129,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1127
1129
  return {
1128
1130
  value: 1,
1129
1131
  name: e?.name || "",
1130
- itemStyle: { color: t ? xe : Se },
1132
+ itemStyle: { color: t ? Se : Ce },
1131
1133
  warn: t
1132
1134
  };
1133
1135
  }), await m(), b();
@@ -1143,7 +1145,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1143
1145
  tooltip: {
1144
1146
  trigger: "item",
1145
1147
  formatter: (e) => {
1146
- let t = e?.data?.warn, n = e?.data?.itemStyle?.color || Se;
1148
+ let t = e?.data?.warn, n = e?.data?.itemStyle?.color || Ce;
1147
1149
  return `${e?.name ?? ""} <span style="color:${n};">${t ? "报警" : "正常"}</span>`;
1148
1150
  }
1149
1151
  },
@@ -1182,43 +1184,52 @@ var D = { class: "YCAIChatPanel" }, O = {
1182
1184
  class: "YCServiceSummaryMiningAreaTrafficAnalysis-chart",
1183
1185
  ref_key: "chartRef",
1184
1186
  ref: o
1185
- }, null, 512)], 8, be)), [[n, u.value]]);
1187
+ }, null, 512)], 8, xe)), [[n, u.value]]);
1186
1188
  };
1187
1189
  }
1188
- }), [["__scopeId", "data-v-71365fd2"]]), we = { class: "YCServiceSummary-themeToggle" }, Te = { class: "YCServiceSummary-left" }, Ee = { class: "YCServiceSummary-statPanel" }, De = { class: "YCServiceSummary-statPanel-content" }, Oe = ["onClick"], ke = { class: "YCServiceSummary-statCard-label" }, Ae = { class: "YCServiceSummary-statCard-list" }, je = { class: "value" }, Me = { class: "YCServiceSummary-aiPanel" }, Ne = { class: "YCServiceSummary-aiPanel-head" }, Pe = { class: "YCServiceSummary-aiPanel-title" }, Fe = { class: "YCServiceSummary-aiPanel-summary" }, Ie = {
1190
+ }), [["__scopeId", "data-v-71365fd2"]]), Te = { class: "YCServiceSummary-themeToggle" }, Ee = { class: "YCServiceSummary-left" }, De = { class: "YCServiceSummary-statPanel" }, Oe = { class: "YCServiceSummary-statPanel-content" }, ke = ["onClick"], Ae = { class: "YCServiceSummary-statCard-label" }, je = { class: "YCServiceSummary-statCard-list" }, Me = { class: "value" }, Ne = { class: "YCServiceSummary-aiPanel" }, Pe = { class: "YCServiceSummary-aiPanel-head" }, Fe = { class: "YCServiceSummary-aiPanel-title" }, Ie = { class: "YCServiceSummary-aiPanel-summary" }, Le = {
1189
1191
  key: 0,
1190
1192
  class: "YCServiceSummary-aiPanel-charts"
1191
- }, Le = { class: "YCServiceSummary-aiPanel-chartItem" }, Re = { class: "YCServiceSummary-aiPanel-chartItem" }, ze = {
1193
+ }, Re = { class: "YCServiceSummary-aiPanel-chartItem" }, ze = { class: "YCServiceSummary-aiPanel-chartItem" }, Be = {
1192
1194
  key: 1,
1193
1195
  class: "YCServiceSummary-aiPanel-charts"
1194
- }, Be = { class: "YCServiceSummary-aiPanel-chartItem" }, Ve = { class: "YCServiceSummary-aiPanel-chartItem" }, He = {
1196
+ }, Ve = { class: "YCServiceSummary-aiPanel-chartItem" }, He = { class: "YCServiceSummary-aiPanel-chartItem" }, Ue = {
1195
1197
  key: 2,
1196
1198
  class: "YCServiceSummary-aiPanel-charts"
1197
- }, Ue = { class: "YCServiceSummary-aiPanel-chartItem" }, We = { class: "YCServiceSummary-aiPanel-chartItem" }, Ge = {
1199
+ }, We = { class: "YCServiceSummary-aiPanel-chartItem" }, Ge = { class: "YCServiceSummary-aiPanel-chartItem" }, Ke = {
1198
1200
  key: 3,
1199
1201
  class: "YCServiceSummary-aiPanel-charts"
1200
- }, Ke = { class: "YCServiceSummary-aiPanel-chartItem" }, qe = { class: "YCServiceSummary-aiPanel-chartItem" }, Je = { class: "YCServiceSummary-material" }, Ye = { class: "YCServiceSummary-material-head" }, Xe = { class: "YCServiceSummary-material-title" }, Ze = { class: "YCServiceSummary-material-actions" }, Qe = { class: "YCServiceSummary-material-body" }, $e = ["src", "alt"], et = {
1202
+ }, qe = { class: "YCServiceSummary-aiPanel-chartItem" }, Je = { class: "YCServiceSummary-aiPanel-chartItem" }, Ye = { class: "YCServiceSummary-material" }, Xe = { class: "YCServiceSummary-material-head" }, Ze = { class: "YCServiceSummary-material-title" }, Qe = { class: "YCServiceSummary-material-actions" }, $e = { class: "YCServiceSummary-material-body" }, et = ["src", "alt"], tt = {
1201
1203
  key: 0,
1202
1204
  class: "YCServiceSummary-right"
1203
- }, tt = {
1205
+ }, nt = {
1204
1206
  key: 1,
1205
1207
  class: "YCServiceSummary-timeRangeMask"
1206
- }, nt = { class: "YCServiceSummary-timeRangeDialog" }, rt = { class: "YCServiceSummary-timeRangeDialog-body" }, it = { class: "YCServiceSummary-timeRangeDialog-field" }, at = ["disabled"], ot = { class: "YCServiceSummary-timeRangeDialog-field" }, st = ["disabled"], ct = {
1208
+ }, rt = { class: "YCServiceSummary-timeRangeDialog" }, it = { class: "YCServiceSummary-timeRangeDialog-body" }, at = { class: "YCServiceSummary-timeRangeDialog-field" }, ot = ["disabled"], st = { class: "YCServiceSummary-timeRangeDialog-field" }, ct = ["disabled"], lt = {
1207
1209
  key: 0,
1208
1210
  class: "YCServiceSummary-timeRangeDialog-error"
1209
- }, lt = { class: "YCServiceSummary-timeRangeDialog-footer" }, ut = ["disabled"], dt = ["disabled"], ft = {
1211
+ }, ut = { class: "YCServiceSummary-timeRangeDialog-footer" }, dt = ["disabled"], ft = ["disabled"], pt = {
1210
1212
  key: 0,
1211
1213
  class: "YCServiceSummary-timeRangeDialog-spinner"
1212
- }, pt = {
1214
+ }, mt = {
1213
1215
  key: 2,
1216
+ class: "YCServiceSummary-timeRangeMask"
1217
+ }, ht = { class: "YCServiceSummary-timeRangeDialog YCServiceSummary-statusConfirmDialog" }, gt = { class: "YCServiceSummary-timeRangeDialog-head" }, _t = { class: "YCServiceSummary-timeRangeDialog-title" }, vt = { class: "YCServiceSummary-timeRangeDialog-body" }, yt = { class: "YCServiceSummary-statusConfirm-text" }, bt = {
1218
+ key: 0,
1219
+ class: "YCServiceSummary-timeRangeDialog-error"
1220
+ }, xt = { class: "YCServiceSummary-timeRangeDialog-footer" }, St = ["disabled"], Ct = ["disabled"], wt = {
1221
+ key: 0,
1222
+ class: "YCServiceSummary-timeRangeDialog-spinner"
1223
+ }, Tt = {
1224
+ key: 3,
1214
1225
  class: "YCServiceSummary-editorMask"
1215
- }, mt = { class: "YCServiceSummary-editorDialog" }, ht = { class: "YCServiceSummary-editorDialog-head" }, gt = { class: "YCServiceSummary-editorDialog-title" }, _t = { class: "YCServiceSummary-editorDialog-body" }, vt = {
1226
+ }, Et = { class: "YCServiceSummary-editorDialog" }, Dt = { class: "YCServiceSummary-editorDialog-head" }, Ot = { class: "YCServiceSummary-editorDialog-title" }, kt = { class: "YCServiceSummary-editorDialog-body" }, At = {
1216
1227
  key: 0,
1217
1228
  class: "YCServiceSummary-editorDialog-loading"
1218
- }, yt = {
1229
+ }, jt = {
1219
1230
  key: 1,
1220
1231
  class: "YCServiceSummary-editorDialog-error"
1221
- }, bt = { class: "YCServiceSummary-editorDialog-errorText" }, xt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1232
+ }, Mt = { class: "YCServiceSummary-editorDialog-errorText" }, Nt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1222
1233
  __name: "YCServiceSummary",
1223
1234
  props: [
1224
1235
  "appKey",
@@ -1232,17 +1243,18 @@ var D = { class: "YCAIChatPanel" }, O = {
1232
1243
  "showEditBtn"
1233
1244
  ],
1234
1245
  setup(t) {
1235
- let n = t, r = y([]), l = y(0), f = a(() => r.value[l.value]?.title || ""), g = a(() => r.value[l.value]?.warnInfo || ""), T = y(!1), E = a(() => n.showEditBtn === !0), D = y([]), O = y("交通气象服务材料"), k = y(""), ee = y(""), A = y(!1), j = y(!1), M = y(""), N = y(null), P = null, F = a(() => k.value.split("/").pop() || `${O.value}.docx`), te = (e) => e && (e.split("/").pop() || "").replace(/\.[^.]+$/, "") || "交通气象服务材料", ne = (e) => !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
1246
+ let n = t, r = y([]), l = y(0), f = a(() => r.value[l.value]?.title || ""), g = a(() => r.value[l.value]?.warnInfo || ""), T = y(!1), E = a(() => n.showEditBtn === !0), O = y([]), k = y("交通气象服务材料"), A = y(""), ee = y(""), j = y(""), M = y(2), te = y(!1), N = y(!1), P = y(""), ne = y(null), F = null, re = a(() => A.value.split("/").pop() || `${k.value}.docx`), ie = (e) => e && (e.split("/").pop() || "").replace(/\.[^.]+$/, "") || "交通气象服务材料", ae = (e) => !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
1236
1247
  label: e.includes(":") ? e : `${e}:`,
1237
1248
  value: String(t)
1238
- })), re = () => {
1249
+ })), oe = () => {
1250
+ if (!E.value) return;
1239
1251
  let e = r.value[l.value];
1240
- e && (D.value = e.imgUrl ? String(e.imgUrl).split(",").map((e) => e.trim()).filter(Boolean) : [], O.value = te(e.workUrl), k.value = e.workUrl || "", ee.value = e.workflowId || "");
1252
+ e && (O.value = e.imgUrl ? String(e.imgUrl).split(",").map((e) => e.trim()).filter(Boolean) : [], k.value = ie(e.workUrl), A.value = e.workUrl || "", ee.value = e.workflowId || "", j.value = e.id ?? "", M.value = Number(e.status ?? 2));
1241
1253
  };
1242
1254
  C(l, () => {
1243
- re();
1255
+ oe();
1244
1256
  });
1245
- let ie = async () => {
1257
+ let se = async () => {
1246
1258
  let t = n.ids?.baseData;
1247
1259
  if (!t?.id) {
1248
1260
  console.warn("[YCServiceSummary] ids.baseData 未配置");
@@ -1264,20 +1276,47 @@ var D = { class: "YCAIChatPanel" }, O = {
1264
1276
  }
1265
1277
  r.value = i.map((e) => ({
1266
1278
  title: e.分类 || "",
1267
- rows: ne(e.数据),
1279
+ rows: ae(e.数据),
1268
1280
  warnInfo: e.预警信息 || "",
1269
1281
  workUrl: e.workUrl || "",
1270
1282
  imgUrl: e.imgUrl || "",
1271
- workflowId: e.workflowId || ""
1272
- })), l.value = 0, re();
1283
+ workflowId: e.workflowId || "",
1284
+ id: e.id,
1285
+ status: e.status
1286
+ })), l.value = 0, oe();
1273
1287
  } catch (e) {
1274
1288
  console.error("[YCServiceSummary] baseData 加载失败", e);
1275
1289
  }
1290
+ }, ce = async () => {
1291
+ let t = n.ids?.latestFile;
1292
+ if (!t?.id) {
1293
+ console.warn("[YCServiceSummary] ids.latestFile 未配置");
1294
+ return;
1295
+ }
1296
+ try {
1297
+ let r = (await e({
1298
+ appKey: n.appKey,
1299
+ appSalt: n.appSalt,
1300
+ id: t.id,
1301
+ variables: {},
1302
+ baseHttp: n.baseHttp,
1303
+ reqType: t.reqType,
1304
+ isFormData: t.isFormData
1305
+ }))?.data?.result?.output;
1306
+ if (!Array.isArray(r) || r.length === 0) {
1307
+ console.warn("[YCServiceSummary] latestFile 返回为空");
1308
+ return;
1309
+ }
1310
+ let i = r[0], a = (e) => String(e || "").replace(/`/g, "").trim();
1311
+ k.value = a(i.title) || "交通气象服务材料", O.value = a(i.http_png).split(",").map((e) => e.trim()).filter(Boolean), A.value = a(i.file_url), ee.value = "";
1312
+ } catch (e) {
1313
+ console.error("[YCServiceSummary] latestFile 加载失败", e);
1314
+ }
1276
1315
  };
1277
1316
  _(() => {
1278
- ie();
1317
+ se(), E.value || ce();
1279
1318
  });
1280
- let I = (e) => e ? /^(https?:)?\/\//i.test(e) || e.startsWith("data:") || !n.baseHttp ? e : n.baseHttp.replace(/\/$/, "") + (e.startsWith("/") ? e : `/${e}`) : "", ae = (e) => {
1319
+ let le = (e) => e ? /^(https?:)?\/\//i.test(e) || e.startsWith("data:") || !n.baseHttp ? e : n.baseHttp.replace(/\/$/, "") + (e.startsWith("/") ? e : `/${e}`) : "", L = (e) => {
1281
1320
  let t = (e || "docx").toLowerCase();
1282
1321
  return [
1283
1322
  "xls",
@@ -1304,7 +1343,7 @@ var D = { class: "YCAIChatPanel" }, O = {
1304
1343
  "fodp",
1305
1344
  "otp"
1306
1345
  ].includes(t) ? "ppt" : t === "pdf" ? "pdf" : "word";
1307
- }, oe = () => new Promise((e, t) => {
1346
+ }, R = () => new Promise((e, t) => {
1308
1347
  if (window.DocsAPI?.DocEditor) {
1309
1348
  e();
1310
1349
  return;
@@ -1321,30 +1360,30 @@ var D = { class: "YCAIChatPanel" }, O = {
1321
1360
  setTimeout(r, 100);
1322
1361
  };
1323
1362
  r();
1324
- }), se = async () => {
1325
- let e = N.value;
1363
+ }), z = async () => {
1364
+ let e = ne.value;
1326
1365
  if (e) {
1327
- j.value = !0, M.value = "";
1366
+ N.value = !0, P.value = "";
1328
1367
  try {
1329
- await oe();
1368
+ await R();
1330
1369
  let t = window.DocsAPI;
1331
1370
  if (!t?.DocEditor) {
1332
- M.value = "OnlyOffice API 不可用,请检查服务地址和代理";
1371
+ P.value = "OnlyOffice API 不可用,请检查服务地址和代理";
1333
1372
  return;
1334
1373
  }
1335
- let r = encodeURI(I(k.value));
1374
+ let r = encodeURI(le(A.value));
1336
1375
  if (!r) {
1337
- M.value = "文件地址为空";
1376
+ P.value = "文件地址为空";
1338
1377
  return;
1339
1378
  }
1340
- let i = (F.value.split(".").pop() || "docx").toLowerCase(), a = `yc-onlyoffice-editor-${Date.now()}`;
1341
- if (P) {
1379
+ let i = (re.value.split(".").pop() || "docx").toLowerCase(), a = `yc-onlyoffice-editor-${Date.now()}`;
1380
+ if (F) {
1342
1381
  try {
1343
- P.destroyEditor();
1382
+ F.destroyEditor();
1344
1383
  } catch (e) {
1345
1384
  console.warn("[YCServiceSummary] 销毁旧 OnlyOffice 编辑器失败:", e);
1346
1385
  }
1347
- P = null;
1386
+ F = null;
1348
1387
  }
1349
1388
  e.innerHTML = "";
1350
1389
  let o = document.createElement("div");
@@ -1353,9 +1392,9 @@ var D = { class: "YCAIChatPanel" }, O = {
1353
1392
  type: "desktop",
1354
1393
  width: "100%",
1355
1394
  height: "100%",
1356
- documentType: ae(i),
1395
+ documentType: L(i),
1357
1396
  document: {
1358
- title: F.value || "文档",
1397
+ title: re.value || "文档",
1359
1398
  url: r,
1360
1399
  fileType: i,
1361
1400
  key: `${ee.value}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
@@ -1417,13 +1456,13 @@ var D = { class: "YCAIChatPanel" }, O = {
1417
1456
  },
1418
1457
  events: {
1419
1458
  onReady: () => {
1420
- j.value = !1;
1459
+ N.value = !1;
1421
1460
  },
1422
1461
  onAppReady: () => {
1423
- j.value = !1;
1462
+ N.value = !1;
1424
1463
  },
1425
1464
  onError: (e) => {
1426
- j.value = !1, M.value = `文档加载失败:${e?.description || e?.data?.description || e?.message || JSON.stringify(e)}`, console.error("[YCServiceSummary] OnlyOffice onError:", e);
1465
+ N.value = !1, P.value = `文档加载失败:${e?.description || e?.data?.description || e?.message || JSON.stringify(e)}`, console.error("[YCServiceSummary] OnlyOffice onError:", e);
1427
1466
  },
1428
1467
  onWarning: (e) => {
1429
1468
  console.warn("[YCServiceSummary] OnlyOffice onWarning:", e);
@@ -1432,40 +1471,40 @@ var D = { class: "YCAIChatPanel" }, O = {
1432
1471
  };
1433
1472
  console.warn("key", s.document.key);
1434
1473
  try {
1435
- P = new t.DocEditor(a, s);
1474
+ F = new t.DocEditor(a, s);
1436
1475
  } catch (e) {
1437
- console.error("[YCServiceSummary] new DocEditor 抛出异常:", e), M.value = "OnlyOffice 编辑器创建失败";
1476
+ console.error("[YCServiceSummary] new DocEditor 抛出异常:", e), P.value = "OnlyOffice 编辑器创建失败";
1438
1477
  }
1439
1478
  } catch (e) {
1440
- console.error("[YCServiceSummary] 初始化 OnlyOffice 失败:", e), M.value = `打开文档失败:${e instanceof Error ? e.message : String(e)}`;
1479
+ console.error("[YCServiceSummary] 初始化 OnlyOffice 失败:", e), P.value = `打开文档失败:${e instanceof Error ? e.message : String(e)}`;
1441
1480
  } finally {
1442
- M.value && (j.value = !1);
1481
+ P.value && (N.value = !1);
1443
1482
  }
1444
1483
  }
1445
- }, R = () => {
1446
- A.value = !0, m(() => se());
1447
- }, z = () => {
1448
- if (P) {
1484
+ }, V = () => {
1485
+ te.value = !0, m(() => z());
1486
+ }, ue = () => {
1487
+ if (F) {
1449
1488
  try {
1450
- P.destroyEditor();
1489
+ F.destroyEditor();
1451
1490
  } catch (e) {
1452
1491
  console.warn("[YCServiceSummary] 销毁 OnlyOffice 编辑器失败:", e);
1453
1492
  }
1454
- P = null;
1493
+ F = null;
1455
1494
  }
1456
- N.value && (N.value.innerHTML = ""), A.value = !1, j.value = !1, M.value = "";
1457
- }, B = () => {
1458
- let e = I(k.value);
1495
+ ne.value && (ne.value.innerHTML = ""), te.value = !1, N.value = !1, P.value = "";
1496
+ }, H = () => {
1497
+ let e = le(A.value);
1459
1498
  if (!e) return;
1460
1499
  let t = document.createElement("a");
1461
- t.href = encodeURI(e), t.download = F.value, t.target = "_blank", t.click();
1462
- }, H = (e) => {
1463
- e === "edit" && R(), e === "download" && B();
1464
- }, U = y(!1), W = y(""), G = y(""), K = y(!1), q = y(""), J = (e) => e ? e.replace("T", " ").substring(0, 13) + ":00:00" : "", ue = () => {
1500
+ t.href = encodeURI(e), t.download = re.value, t.target = "_blank", t.click();
1501
+ }, fe = (e) => {
1502
+ e === "edit" && V(), e === "download" && H();
1503
+ }, U = y(!1), W = y(""), G = y(""), K = y(!1), q = y(""), J = (e) => e ? e.replace("T", " ").substring(0, 13) + ":00:00" : "", he = () => {
1465
1504
  W.value = "", G.value = "", q.value = "", K.value = !1, U.value = !0;
1466
- }, Y = () => {
1505
+ }, ge = () => {
1467
1506
  K.value || (U.value = !1, q.value = "");
1468
- }, fe = async () => {
1507
+ }, Y = async () => {
1469
1508
  if (!W.value || !G.value) {
1470
1509
  q.value = "请选择开始和结束时间";
1471
1510
  return;
@@ -1493,19 +1532,57 @@ var D = { class: "YCAIChatPanel" }, O = {
1493
1532
  reqType: t.reqType,
1494
1533
  isFormData: t.isFormData
1495
1534
  });
1496
- console.log("[YCServiceSummary] generate 工作流返回:", r), U.value = !1, await ie();
1535
+ console.log("[YCServiceSummary] generate 工作流返回:", r), U.value = !1, await se();
1497
1536
  } catch (e) {
1498
1537
  console.error("[YCServiceSummary] generate 工作流调用失败", e), q.value = `生成失败:${e instanceof Error ? e.message : String(e)}`;
1499
1538
  } finally {
1500
1539
  K.value = !1;
1501
1540
  }
1541
+ }, X = y(!1), Z = y("audit"), Q = y(!1), $ = y(""), ye = (e) => {
1542
+ Z.value = e, $.value = "", Q.value = !1, X.value = !0;
1543
+ }, xe = () => {
1544
+ Q.value || (X.value = !1, $.value = "");
1545
+ }, Se = async () => {
1546
+ let t = n.ids?.status;
1547
+ if (!t?.id) {
1548
+ $.value = "status 工作流未配置";
1549
+ return;
1550
+ }
1551
+ if (j.value === "" || j.value === void 0 || j.value === null) {
1552
+ $.value = "当前材料缺少 id";
1553
+ return;
1554
+ }
1555
+ Q.value = !0, $.value = "";
1556
+ try {
1557
+ let r = await e({
1558
+ appKey: n.appKey,
1559
+ appSalt: n.appSalt,
1560
+ id: t.id,
1561
+ variables: {
1562
+ id: j.value,
1563
+ status: Z.value === "audit" ? "1" : "2"
1564
+ },
1565
+ baseHttp: n.baseHttp,
1566
+ reqType: t.reqType,
1567
+ isFormData: t.isFormData
1568
+ });
1569
+ if (console.log("[YCServiceSummary] status 工作流返回:", r), r?.data?.result?.__chain_state_status !== "SUCCEEDED") {
1570
+ $.value = r?.data?.message || "操作失败";
1571
+ return;
1572
+ }
1573
+ D.success(Z.value === "audit" ? "审核通过" : "发布成功"), X.value = !1, await se();
1574
+ } catch (e) {
1575
+ console.error("[YCServiceSummary] status 工作流调用失败", e), $.value = `操作失败:${e instanceof Error ? e.message : String(e)}`;
1576
+ } finally {
1577
+ Q.value = !1;
1578
+ }
1502
1579
  };
1503
1580
  return (e, t) => (v(), s("div", { class: h(["YCServiceSummary", { "is-dark": T.value }]) }, [
1504
- c("div", we, [c("button", {
1581
+ c("div", Te, [c("button", {
1505
1582
  class: h(["YCServiceSummary-themeBtn", { "is-active": !T.value }]),
1506
1583
  onClick: t[0] ||= (e) => T.value = !1,
1507
1584
  title: "浅色"
1508
- }, [...t[6] ||= [c("svg", {
1585
+ }, [...t[8] ||= [c("svg", {
1509
1586
  viewBox: "0 0 24 24",
1510
1587
  width: "12",
1511
1588
  height: "12",
@@ -1514,36 +1591,36 @@ var D = { class: "YCAIChatPanel" }, O = {
1514
1591
  class: h(["YCServiceSummary-themeBtn", { "is-active": T.value }]),
1515
1592
  onClick: t[1] ||= (e) => T.value = !0,
1516
1593
  title: "深色"
1517
- }, [...t[7] ||= [c("svg", {
1594
+ }, [...t[9] ||= [c("svg", {
1518
1595
  viewBox: "0 0 24 24",
1519
1596
  width: "12",
1520
1597
  height: "12",
1521
1598
  fill: "currentColor"
1522
1599
  }, [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)]),
1523
- c("div", Te, [
1524
- c("div", Ee, [t[9] ||= c("div", { class: "YCServiceSummary-statPanel-title" }, "宜春气象服务", -1), c("div", De, [(v(!0), s(i, null, b(r.value, (e, n) => (v(), s("div", {
1600
+ c("div", Ee, [
1601
+ c("div", De, [t[11] ||= c("div", { class: "YCServiceSummary-statPanel-title" }, "宜春气象服务", -1), c("div", Oe, [(v(!0), s(i, null, b(r.value, (e, n) => (v(), s("div", {
1525
1602
  key: e.title,
1526
1603
  class: h(["YCServiceSummary-statCard", { "is-active": l.value === n }]),
1527
1604
  onClick: (e) => l.value = n
1528
- }, [c("div", ke, [t[8] ||= c("span", { class: "dot" }, null, -1), u(" " + x(e.title), 1)]), c("div", Ae, [(v(!0), s(i, null, b(e.rows, (e) => (v(), s("div", {
1605
+ }, [c("div", Ae, [t[10] ||= c("span", { class: "dot" }, null, -1), u(" " + x(e.title), 1)]), c("div", je, [(v(!0), s(i, null, b(e.rows, (e) => (v(), s("div", {
1529
1606
  key: e.label,
1530
1607
  class: "row"
1531
- }, [c("span", null, x(e.label), 1), c("span", je, x(e.value), 1)]))), 128))])], 10, Oe))), 128))])]),
1532
- c("div", Me, [
1533
- c("div", Ne, [c("div", Pe, [t[10] ||= c("span", { class: "icon" }, null, -1), u(" " + x(f.value) + " AI 分析 ", 1)])]),
1534
- t[19] ||= c("div", { class: "YCServiceSummary-aiPanel-warningTitle" }, "预警信号", -1),
1535
- c("div", Fe, x(g.value), 1),
1536
- f.value === "公路气象服务" ? (v(), s("div", Ie, [c("div", Le, [t[11] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路实况状态", -1), d(V, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Re, [t[12] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路预报状态", -1), d(ce, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1537
- f.value === "地质灾害风险分析服务" ? (v(), s("div", ze, [c("div", Be, [t[13] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害实况报警", -1), d(le, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Ve, [t[14] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害预报报警", -1), d(de, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1538
- f.value === "水库灾害风险分析服务" ? (v(), s("div", He, [c("div", Ue, [t[15] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害实况报警", -1), d(he, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", We, [t[16] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害预报报警", -1), d(Q, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1539
- f.value === "锂电矿区气象服务" ? (v(), s("div", Ge, [c("div", Ke, [t[17] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区实况预警", -1), d(ye, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", qe, [t[18] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区预报报警", -1), d(Ce, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0)
1608
+ }, [c("span", null, x(e.label), 1), c("span", Me, x(e.value), 1)]))), 128))])], 10, ke))), 128))])]),
1609
+ c("div", Ne, [
1610
+ c("div", Pe, [c("div", Fe, [t[12] ||= c("span", { class: "icon" }, null, -1), u(" " + x(f.value) + " AI 分析 ", 1)])]),
1611
+ t[21] ||= c("div", { class: "YCServiceSummary-aiPanel-warningTitle" }, "预警信号", -1),
1612
+ c("div", Ie, x(g.value), 1),
1613
+ f.value === "公路气象服务" ? (v(), s("div", Le, [c("div", Re, [t[13] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路实况状态", -1), d(B, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", ze, [t[14] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "高速公路预报状态", -1), d(de, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1614
+ f.value === "地质灾害风险分析服务" ? (v(), s("div", Be, [c("div", Ve, [t[15] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害实况报警", -1), d(pe, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", He, [t[16] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "地质灾害预报报警", -1), d(me, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1615
+ f.value === "水库灾害风险分析服务" ? (v(), s("div", Ue, [c("div", We, [t[17] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害实况报警", -1), d(_e, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Ge, [t[18] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "水库灾害预报报警", -1), d(ve, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0),
1616
+ f.value === "锂电矿区气象服务" ? (v(), s("div", Ke, [c("div", qe, [t[19] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区实况预警", -1), d(be, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])]), c("div", Je, [t[20] ||= c("div", { class: "YCServiceSummary-aiPanel-chartTitle" }, "锂电矿区预报报警", -1), d(we, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])])) : o("", !0)
1540
1617
  ]),
1541
- c("div", Je, [c("div", Ye, [c("span", Xe, x(O.value), 1), c("div", Ze, [
1618
+ c("div", Ye, [c("div", Xe, [c("span", Ze, x(k.value), 1), c("div", Qe, [
1542
1619
  E.value ? (v(), s("button", {
1543
1620
  key: 0,
1544
1621
  class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--edit",
1545
- onClick: t[2] ||= (e) => H("edit")
1546
- }, [...t[20] ||= [c("svg", {
1622
+ onClick: t[2] ||= (e) => fe("edit")
1623
+ }, [...t[22] ||= [c("svg", {
1547
1624
  viewBox: "0 0 24 24",
1548
1625
  width: "12",
1549
1626
  height: "12",
@@ -1551,72 +1628,118 @@ var D = { class: "YCAIChatPanel" }, O = {
1551
1628
  }, [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),
1552
1629
  c("button", {
1553
1630
  class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--download",
1554
- onClick: t[3] ||= (e) => H("download")
1555
- }, [...t[21] ||= [c("svg", {
1631
+ onClick: t[3] ||= (e) => fe("download")
1632
+ }, [...t[23] ||= [c("svg", {
1556
1633
  viewBox: "0 0 24 24",
1557
1634
  width: "12",
1558
1635
  height: "12",
1559
1636
  fill: "currentColor"
1560
1637
  }, [c("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" })], -1), u(" 下载 ", -1)]]),
1561
- c("button", {
1638
+ E.value ? (v(), s("button", {
1639
+ key: 1,
1562
1640
  class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--generate",
1563
- onClick: ue
1564
- }, [...t[22] ||= [c("svg", {
1641
+ onClick: he
1642
+ }, [...t[24] ||= [c("svg", {
1565
1643
  viewBox: "0 0 24 24",
1566
1644
  width: "12",
1567
1645
  height: "12",
1568
1646
  fill: "currentColor"
1569
- }, [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)]])
1570
- ])]), c("div", Qe, [(v(!0), s(i, null, b(D.value, (e, t) => (v(), s("img", {
1647
+ }, [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),
1648
+ E.value && (M.value === 0 || M.value === 1) ? (v(), s(i, { key: 2 }, [
1649
+ t[27] ||= c("span", { class: "YCServiceSummary-material-divider" }, null, -1),
1650
+ M.value === 0 ? (v(), s("button", {
1651
+ key: 0,
1652
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--audit",
1653
+ onClick: t[4] ||= (e) => ye("audit")
1654
+ }, [...t[25] ||= [c("svg", {
1655
+ viewBox: "0 0 24 24",
1656
+ width: "12",
1657
+ height: "12",
1658
+ fill: "currentColor"
1659
+ }, [c("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1), u(" 审核 ", -1)]])) : o("", !0),
1660
+ M.value === 1 ? (v(), s("button", {
1661
+ key: 1,
1662
+ class: "YCServiceSummary-material-btn YCServiceSummary-material-btn--publish",
1663
+ onClick: t[5] ||= (e) => ye("publish")
1664
+ }, [...t[26] ||= [c("svg", {
1665
+ viewBox: "0 0 24 24",
1666
+ width: "12",
1667
+ height: "12",
1668
+ fill: "currentColor"
1669
+ }, [c("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1), u(" 发布 ", -1)]])) : o("", !0)
1670
+ ], 64)) : o("", !0)
1671
+ ])]), c("div", $e, [(v(!0), s(i, null, b(O.value, (e, t) => (v(), s("img", {
1571
1672
  key: t,
1572
1673
  class: "YCServiceSummary-material-image",
1573
1674
  src: e,
1574
- alt: O.value
1575
- }, null, 8, $e))), 128))])])
1675
+ alt: k.value
1676
+ }, null, 8, et))), 128))])])
1576
1677
  ]),
1577
- E.value ? (v(), s("div", et, [d(L, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])) : o("", !0),
1578
- U.value ? (v(), s("div", tt, [c("div", nt, [
1579
- c("div", { class: "YCServiceSummary-timeRangeDialog-head" }, [t[24] ||= c("span", { class: "YCServiceSummary-timeRangeDialog-title" }, "时间段生成", -1), c("button", {
1678
+ E.value ? (v(), s("div", tt, [d(I, p(n, { theme: T.value ? "dark" : "light" }), null, 16, ["theme"])])) : o("", !0),
1679
+ U.value ? (v(), s("div", nt, [c("div", rt, [
1680
+ c("div", { class: "YCServiceSummary-timeRangeDialog-head" }, [t[29] ||= c("span", { class: "YCServiceSummary-timeRangeDialog-title" }, "时间段生成", -1), c("button", {
1580
1681
  class: "YCServiceSummary-timeRangeDialog-close",
1581
1682
  title: "关闭",
1582
- onClick: Y
1583
- }, [...t[23] ||= [c("svg", {
1683
+ onClick: ge
1684
+ }, [...t[28] ||= [c("svg", {
1584
1685
  viewBox: "0 0 24 24",
1585
1686
  width: "14",
1586
1687
  height: "14",
1587
1688
  fill: "currentColor"
1588
1689
  }, [c("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])]),
1589
- c("div", rt, [
1590
- c("div", it, [t[25] ||= c("label", { class: "YCServiceSummary-timeRangeDialog-label" }, "开始时间", -1), w(c("input", {
1690
+ c("div", it, [
1691
+ c("div", at, [t[30] ||= c("label", { class: "YCServiceSummary-timeRangeDialog-label" }, "开始时间", -1), w(c("input", {
1591
1692
  type: "datetime-local",
1592
1693
  step: "3600",
1593
1694
  class: "YCServiceSummary-timeRangeDialog-input",
1594
- "onUpdate:modelValue": t[4] ||= (e) => W.value = e,
1695
+ "onUpdate:modelValue": t[6] ||= (e) => W.value = e,
1595
1696
  disabled: K.value
1596
- }, null, 8, at), [[S, W.value]])]),
1597
- c("div", ot, [t[26] ||= c("label", { class: "YCServiceSummary-timeRangeDialog-label" }, "结束时间", -1), w(c("input", {
1697
+ }, null, 8, ot), [[S, W.value]])]),
1698
+ c("div", st, [t[31] ||= c("label", { class: "YCServiceSummary-timeRangeDialog-label" }, "结束时间", -1), w(c("input", {
1598
1699
  type: "datetime-local",
1599
1700
  step: "3600",
1600
1701
  class: "YCServiceSummary-timeRangeDialog-input",
1601
- "onUpdate:modelValue": t[5] ||= (e) => G.value = e,
1702
+ "onUpdate:modelValue": t[7] ||= (e) => G.value = e,
1602
1703
  disabled: K.value
1603
- }, null, 8, st), [[S, G.value]])]),
1604
- q.value ? (v(), s("div", ct, x(q.value), 1)) : o("", !0)
1704
+ }, null, 8, ct), [[S, G.value]])]),
1705
+ q.value ? (v(), s("div", lt, x(q.value), 1)) : o("", !0)
1605
1706
  ]),
1606
- c("div", lt, [c("button", {
1707
+ c("div", ut, [c("button", {
1607
1708
  class: "YCServiceSummary-timeRangeDialog-btn YCServiceSummary-timeRangeDialog-btn--cancel",
1608
- onClick: Y,
1709
+ onClick: ge,
1609
1710
  disabled: K.value
1610
- }, "取消", 8, ut), c("button", {
1711
+ }, "取消", 8, dt), c("button", {
1611
1712
  class: "YCServiceSummary-timeRangeDialog-btn YCServiceSummary-timeRangeDialog-btn--confirm",
1612
- onClick: fe,
1713
+ onClick: Y,
1613
1714
  disabled: K.value
1614
- }, [K.value ? (v(), s("span", ft)) : o("", !0), u(" " + x(K.value ? "生成中..." : "确认生成"), 1)], 8, dt)])
1715
+ }, [K.value ? (v(), s("span", pt)) : o("", !0), u(" " + x(K.value ? "生成中..." : "确认生成"), 1)], 8, ft)])
1716
+ ])])) : o("", !0),
1717
+ X.value ? (v(), s("div", mt, [c("div", ht, [
1718
+ c("div", gt, [c("span", _t, x(Z.value === "audit" ? "审核" : "发布"), 1), c("button", {
1719
+ class: "YCServiceSummary-timeRangeDialog-close",
1720
+ title: "关闭",
1721
+ onClick: xe
1722
+ }, [...t[32] ||= [c("svg", {
1723
+ viewBox: "0 0 24 24",
1724
+ width: "14",
1725
+ height: "14",
1726
+ fill: "currentColor"
1727
+ }, [c("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])]),
1728
+ c("div", vt, [c("p", yt, x(Z.value === "audit" ? "是否确认审核通过?" : "是否确认发布?"), 1), $.value ? (v(), s("div", bt, x($.value), 1)) : o("", !0)]),
1729
+ c("div", xt, [c("button", {
1730
+ class: "YCServiceSummary-timeRangeDialog-btn YCServiceSummary-timeRangeDialog-btn--cancel",
1731
+ onClick: xe,
1732
+ disabled: Q.value
1733
+ }, "取消", 8, St), c("button", {
1734
+ class: "YCServiceSummary-timeRangeDialog-btn YCServiceSummary-timeRangeDialog-btn--confirm",
1735
+ onClick: Se,
1736
+ disabled: Q.value
1737
+ }, [Q.value ? (v(), s("span", wt)) : o("", !0), u(" " + x(Q.value ? "提交中..." : "确认"), 1)], 8, Ct)])
1615
1738
  ])])) : o("", !0),
1616
- A.value ? (v(), s("div", pt, [c("div", mt, [c("div", ht, [c("span", gt, x(F.value), 1), c("div", { class: "YCServiceSummary-editorDialog-actions" }, [c("button", {
1739
+ te.value ? (v(), s("div", Tt, [c("div", Et, [c("div", Dt, [c("span", Ot, x(re.value), 1), c("div", { class: "YCServiceSummary-editorDialog-actions" }, [c("button", {
1617
1740
  class: "YCServiceSummary-editorDialog-btn",
1618
- onClick: B
1619
- }, [...t[27] ||= [c("svg", {
1741
+ onClick: H
1742
+ }, [...t[33] ||= [c("svg", {
1620
1743
  viewBox: "0 0 24 24",
1621
1744
  width: "12",
1622
1745
  height: "12",
@@ -1624,26 +1747,26 @@ var D = { class: "YCAIChatPanel" }, O = {
1624
1747
  }, [c("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" })], -1), u(" 下载 ", -1)]]), c("button", {
1625
1748
  class: "YCServiceSummary-editorDialog-close",
1626
1749
  title: "关闭",
1627
- onClick: z
1628
- }, [...t[28] ||= [c("svg", {
1750
+ onClick: ue
1751
+ }, [...t[34] ||= [c("svg", {
1629
1752
  viewBox: "0 0 24 24",
1630
1753
  width: "14",
1631
1754
  height: "14",
1632
1755
  fill: "currentColor"
1633
- }, [c("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]), c("div", _t, [
1756
+ }, [c("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]), c("div", kt, [
1634
1757
  c("div", {
1635
1758
  ref_key: "onlyofficeContainerRef",
1636
- ref: N,
1759
+ ref: ne,
1637
1760
  class: "YCServiceSummary-editorDialog-container"
1638
1761
  }, null, 512),
1639
- j.value ? (v(), s("div", vt, [...t[29] ||= [c("span", { class: "YCServiceSummary-editorDialog-spinner" }, null, -1), c("span", null, "正在加载文档编辑器...", -1)]])) : o("", !0),
1640
- M.value ? (v(), s("div", yt, [c("span", bt, x(M.value), 1), c("button", {
1762
+ N.value ? (v(), s("div", At, [...t[35] ||= [c("span", { class: "YCServiceSummary-editorDialog-spinner" }, null, -1), c("span", null, "正在加载文档编辑器...", -1)]])) : o("", !0),
1763
+ P.value ? (v(), s("div", jt, [c("span", Mt, x(P.value), 1), c("button", {
1641
1764
  class: "YCServiceSummary-editorDialog-retryBtn",
1642
- onClick: se
1765
+ onClick: z
1643
1766
  }, "重试")])) : o("", !0)
1644
1767
  ])])])) : o("", !0)
1645
1768
  ], 2));
1646
1769
  }
1647
- }), [["__scopeId", "data-v-001ef17e"]]);
1770
+ }), [["__scopeId", "data-v-b4be2e72"]]);
1648
1771
  //#endregion
1649
- export { xt as t };
1772
+ export { Nt as t };