nxd-plugin 1.8.49 → 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.
@@ -1,8 +1,8 @@
1
1
  import { g as e, p as t } from "./component-Agent-DwXtdLhK.mjs";
2
2
  import "./component-Forecast72h-CD6eT1xe.mjs";
3
- import { ElIcon as n, ElInput as r, ElLoadingDirective as i, ElOption as a, ElSelect as o, ElTable as s, ElTableColumn as ee } from "element-plus/es";
4
- import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, getCurrentInstance as _, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, withCtx as w, withDirectives as T, withKeys as E, withModifiers as te } from "vue";
5
- import { Search as ne } from "@element-plus/icons-vue";
3
+ import { ElIcon as n, ElInput as r, ElLoadingDirective as i, ElOption as ee, ElSelect as a, ElTable as o, ElTableColumn as s } from "element-plus/es";
4
+ import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, getCurrentInstance as _, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, withCtx as w, withDirectives as T, withKeys as te, withModifiers as ne } from "vue";
5
+ import { Search as re } from "@element-plus/icons-vue";
6
6
  import "element-plus/es/components/select/style/css";
7
7
  import "element-plus/es/components/option/style/css";
8
8
  import "element-plus/es/components/input/style/css";
@@ -11,13 +11,13 @@ import "element-plus/dist/index.css";
11
11
  import "element-plus/es/components/table/style/css";
12
12
  import "element-plus/es/components/table-column/style/css";
13
13
  //#region src/components/HdServiceMarterial/HdServiceMarterial.vue?vue&type=script&setup=true&lang.ts
14
- var re = {
14
+ var ie = {
15
15
  class: "HdServiceMarterial",
16
16
  "element-loading-background": "rgba(0, 0, 0, 0.6)"
17
- }, ie = { class: "HdServiceMarterial-header" }, ae = { class: "HdServiceMarterial-headerContent" }, oe = { class: "HdServiceMarterial-title" }, se = {
17
+ }, ae = { class: "HdServiceMarterial-header" }, oe = { class: "HdServiceMarterial-headerContent" }, se = { class: "HdServiceMarterial-title" }, ce = {
18
18
  key: 0,
19
19
  class: "HdServiceMarterial-dataTime"
20
- }, ce = { class: "HdServiceMarterial-toolbar" }, le = { class: "HdServiceMarterial-tableWrap" }, ue = { class: "HdServiceMarterial-name" }, de = { class: "HdServiceMarterial-actions" }, fe = ["onClick"], D = ["onClick"], pe = { class: "HdServiceMarterial-preview" }, me = { class: "HdServiceMarterial-previewHead" }, O = { class: "HdServiceMarterial-previewHeadTitle" }, k = { class: "HdServiceMarterial-previewBody" }, A = ["src"], j = /* @__PURE__ */ t(/* @__PURE__ */ g({
20
+ }, le = { class: "HdServiceMarterial-toolbar" }, ue = { class: "HdServiceMarterial-tableWrap" }, de = { class: "HdServiceMarterial-name" }, fe = { class: "HdServiceMarterial-actions" }, pe = ["onClick"], me = ["onClick"], he = { class: "HdServiceMarterial-preview" }, ge = { class: "HdServiceMarterial-previewHead" }, _e = { class: "HdServiceMarterial-previewHeadTitle" }, E = { class: "HdServiceMarterial-previewBody" }, D = ["src"], O = /* @__PURE__ */ t(/* @__PURE__ */ g({
21
21
  __name: "HdServiceMarterial",
22
22
  props: {
23
23
  baseHttp: { default: "" },
@@ -30,137 +30,144 @@ var re = {
30
30
  },
31
31
  emits: ["close", "change"],
32
32
  setup(t, { emit: g }) {
33
- let j = _()?.appContext.config.globalProperties.$bus, M = t, N = g, P = b([]), F = b(!1), I = (/* @__PURE__ */ new Date()).getFullYear(), L = Array.from({ length: 20 }, (e, t) => I - t), R = b(""), z = b(I), B = b(""), V = b([]), H = b(!1), U = b(""), W = b([]), G = b({
33
+ let O = _()?.appContext.config.globalProperties.$bus, k = t, A = g, j = b([]), M = b(!1), N = (/* @__PURE__ */ new Date()).getFullYear(), P = Array.from({ length: 20 }, (e, t) => N - t), F = b(""), I = b(N), L = b(""), R = b(""), z = b([]), B = b(!1), V = b(""), H = b([]), U = b({
34
34
  title: "",
35
35
  dataTime: ""
36
- }), he = u(() => M.title || G.value.title || "服务材料"), K = u(() => M.dataTime || G.value.dataTime || ""), q = () => {
37
- Q();
38
- }, J = () => {
39
- Q();
40
- }, ge = (e) => /^https?:\/\//i.test(e), Y = (e) => {
36
+ }), W = b(""), ve = u(() => k.title || U.value.title || "服务材料"), G = u(() => k.dataTime || U.value.dataTime || ""), K = () => {
37
+ Z();
38
+ }, q = () => {
39
+ R.value = j.value.find((e) => e.id === L.value)?.category_name || "", Z();
40
+ }, ye = (e) => /^https?:\/\//i.test(e), J = (e) => {
41
41
  if (!e) return "";
42
- if (ge(e)) return e;
43
- let t = M.imgBaseUrl || "";
42
+ if (ye(e)) return e;
43
+ let t = k.imgBaseUrl || "";
44
44
  return `${t}${t && !t.endsWith("/") && !e.startsWith("/") ? "/" : ""}${e}`;
45
- }, _e = (e) => e.http_png ? (Array.isArray(e.http_png) ? e.http_png : String(e.http_png).split(",")).map((e) => e.trim()).filter(Boolean).map(Y) : [], ve = (e) => {
46
- U.value = e.title, W.value = _e(e), H.value = !0;
47
- }, X = () => {
48
- H.value = !1, W.value = [], U.value = "";
49
- }, ye = (e) => {
50
- let t = Y(e.http_url || e.downloadUrl || e.url);
45
+ }, be = (e) => e.http_png ? (Array.isArray(e.http_png) ? e.http_png : String(e.http_png).split(",")).map((e) => e.trim()).filter(Boolean).map(J) : [], xe = (e) => {
46
+ V.value = e.title, H.value = be(e), B.value = !0;
47
+ }, Y = () => {
48
+ B.value = !1, H.value = [], V.value = "";
49
+ }, Se = (e) => {
50
+ let t = J(e.http_url || e.downloadUrl || e.url);
51
51
  t ? window.open(t, "_blank") : console.warn("HdServiceMarterial 缺少下载地址", e);
52
- }, be = () => {
53
- N("close", "HdServiceMarterial");
54
- }, Z = (e) => e ? e.data === void 0 ? e.result === void 0 ? e : e.result : e.data?.result?.output === void 0 ? e.data?.result === void 0 ? e.data : e.data.result : e.data.result.output : null, Q = async () => {
55
- F.value = !0;
56
- let t = M.ids.data;
52
+ }, Ce = () => {
53
+ A("close", "HdServiceMarterial");
54
+ }, X = (e) => e ? e.data === void 0 ? e.result === void 0 ? e : e.result : e.data?.result?.output === void 0 ? e.data?.result === void 0 ? e.data : e.data.result : e.data.result.output : null, Z = async () => {
55
+ M.value = !0;
56
+ let t = k.ids.data;
57
57
  if (!t?.id) {
58
- console.warn("HdServiceMarterial 缺少搜索工作流配置"), F.value = !1;
58
+ console.warn("HdServiceMarterial 缺少搜索工作流配置"), M.value = !1;
59
59
  return;
60
60
  }
61
- let n = "";
62
- P.value.length && (n = P.value.find((e) => e.id === B.value)?.category_name || "");
63
61
  try {
64
- let r = Z(await e({
62
+ let n = X(await e({
65
63
  id: t.id,
66
- baseHttp: M.baseHttp,
64
+ baseHttp: k.baseHttp,
67
65
  reqType: t.reqType,
68
66
  variables: {
69
- title: R.value,
70
- year: z.value,
71
- materialType: n
67
+ title: F.value,
68
+ year: I.value,
69
+ materialType: R.value
72
70
  },
73
71
  isFormData: t.isFormData,
74
- appKey: M.appKey,
75
- appSalt: M.appSalt
72
+ appKey: k.appKey,
73
+ appSalt: k.appSalt
76
74
  }));
77
- r && (V.value = r || []);
75
+ n && (z.value = n || []);
78
76
  } catch (e) {
79
77
  console.error("HdServiceMarterial 搜索失败", e);
80
78
  } finally {
81
- F.value = !1;
79
+ M.value = !1;
82
80
  }
83
- }, xe = async () => {
84
- await Q();
81
+ }, we = async () => {
82
+ await Z();
83
+ }, Q = (e) => {
84
+ let t = j.value.find((t) => t.category_name === e);
85
+ return t ? (L.value = t.id, R.value = e, Z(), !0) : !1;
85
86
  }, $ = async () => {
86
- await Se(), await xe();
87
- }, Se = async () => {
88
- F.value = !0;
89
- let t = M.ids.type;
87
+ if (await Te(), W.value) {
88
+ let e = Q(W.value);
89
+ if (W.value = "", e) return;
90
+ }
91
+ await we();
92
+ }, Te = async () => {
93
+ M.value = !0;
94
+ let t = k.ids.type;
90
95
  if (!t?.id) {
91
- console.warn("HdServiceMarterial 缺少搜索工作流配置"), F.value = !1;
96
+ console.warn("HdServiceMarterial 缺少搜索工作流配置"), M.value = !1;
92
97
  return;
93
98
  }
94
99
  try {
95
- let n = Z(await e({
100
+ let n = X(await e({
96
101
  id: t.id,
97
- baseHttp: M.baseHttp,
102
+ baseHttp: k.baseHttp,
98
103
  reqType: t.reqType,
99
104
  variables: {},
100
105
  isFormData: t.isFormData,
101
- appKey: M.appKey,
102
- appSalt: M.appSalt
106
+ appKey: k.appKey,
107
+ appSalt: k.appSalt
103
108
  }));
104
- console.log("HdServiceMarterial 加载服务材料类型成功", n), n && (P.value = n || [], console.log("HdServiceMarterial 服务材料类型列表", P.value), B.value = P.value[0]?.id || "");
109
+ console.log("HdServiceMarterial 加载服务材料类型成功", n), n && (j.value = n || [], console.log("HdServiceMarterial 服务材料类型列表", j.value), L.value = j.value[0]?.id || "", R.value = j.value[0]?.category_name || "");
105
110
  } catch (e) {
106
111
  console.error("HdServiceMarterial 加载服务材料类型失败", e);
107
112
  } finally {
108
- F.value = !1;
113
+ M.value = !1;
109
114
  }
110
- }, Ce = (e) => {
115
+ }, Ee = (e) => {
111
116
  if (e?.componentName === "HdServiceMarterial") {
112
- if (e.categoryId) {
113
- let t = P.value.find((t) => String(t.id) === String(e.categoryId));
114
- if (!t) return;
115
- B.value = t.id, Q();
117
+ if (!e.categoryName) {
118
+ $();
119
+ return;
120
+ }
121
+ if (!j.value.length) {
122
+ W.value = String(e.categoryName);
116
123
  return;
117
124
  }
118
- $();
125
+ Q(e.categoryName);
119
126
  }
120
127
  };
121
128
  return v(() => {
122
- j?.on("toComponent", Ce), $();
129
+ O?.on("toComponent", Ee), $();
123
130
  }), (e, t) => {
124
- let u = n, g = r, _ = a, v = o, b = ee, j = s, M = i;
125
- return T((y(), p("div", re, [
131
+ let u = n, g = r, _ = ee, v = a, b = s, O = o, k = i;
132
+ return T((y(), p("div", ie, [
126
133
  m("button", {
127
134
  class: "HdServiceMarterial-close",
128
- onClick: be
135
+ onClick: Ce
129
136
  }, [...t[3] ||= [m("span", null, "✕", -1)]]),
130
- m("div", ie, [m("div", ae, [m("h3", oe, S(he.value), 1), K.value ? (y(), p("span", se, "(数据时间:" + S(K.value) + ")", 1)) : f("", !0)]), t[4] ||= m("img", {
137
+ m("div", ae, [m("div", oe, [m("h3", se, S(ve.value), 1), G.value ? (y(), p("span", ce, "(数据时间:" + S(G.value) + ")", 1)) : f("", !0)]), t[4] ||= m("img", {
131
138
  class: "HdServiceMarterial-headerLine",
132
139
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbsAAAASBAMAAAAwI22/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURQAAAAem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/wem/5bu5GYAAAAPdFJOUwAFwAwc2M8ULQYDn/hGXGnV2UoAAAGZSURBVEjH7ZM/S8NAGId/JYGmmeLspptThurk0CHWRXGo0Nk/S50y6CYSHMRF7Efo4uQXEIpbwUnM6OhnEIeChXjv5ZLLXdLtLCX68vDCe0eGJ7/3AJN1VcL+UImB/SruVJwYTqSAW5V3LLyaPR1c+IIdH12OPZiLcyTAjccZEdccZ0Nn4bXpC3KpCuFu5tkdziX3FJxBSBZZdFk9HempCduMk4xSitJTpOgJSSIPrx10YAUB0tYOwrQ1g12k7ZyODIYXZmQpppLV26rtbDFOXVhua2Fn7WTWwUEyAe5Zc2hiLWTTC3jjk8Hw+jrSM9/Z8raKOAtZVmyr9jbpee4lU9hvSUStw6YvOpqwiXlK9d8IL0Oq5tuqvc3KLMs7q9uyCC0y22aKvDVp4u2SjnJ1c+Wecg7h9gV4CFV8NHpEaw7yF2wVGcIa6OBx/Ax3PI6pRWx6Am98alBbpSODNVTxgAbQUpF3KeVv0s80xMUow8N//YVaqWEV9BJDdby2PBUZ1/te0uU0YzeLa623jjrrvaLOep/+str9ACyAtv25BhHcAAAAAElFTkSuQmCC",
133
140
  alt: ""
134
141
  }, null, -1)]),
135
- m("div", ce, [
142
+ m("div", le, [
136
143
  h(g, {
137
- modelValue: R.value,
138
- "onUpdate:modelValue": t[0] ||= (e) => R.value = e,
144
+ modelValue: F.value,
145
+ "onUpdate:modelValue": t[0] ||= (e) => F.value = e,
139
146
  class: "HdServiceMarterial-search",
140
147
  placeholder: "请输入材料名称",
141
148
  size: "small",
142
- onKeyup: E(q, ["enter"])
149
+ onKeyup: te(K, ["enter"])
143
150
  }, {
144
151
  suffix: w(() => [h(u, {
145
152
  class: "HdServiceMarterial-searchIcon",
146
- onClick: q
153
+ onClick: K
147
154
  }, {
148
- default: w(() => [h(C(ne))]),
155
+ default: w(() => [h(C(re))]),
149
156
  _: 1
150
157
  })]),
151
158
  _: 1
152
159
  }, 8, ["modelValue"]),
153
160
  h(v, {
154
- modelValue: z.value,
155
- "onUpdate:modelValue": t[1] ||= (e) => z.value = e,
161
+ modelValue: I.value,
162
+ "onUpdate:modelValue": t[1] ||= (e) => I.value = e,
156
163
  class: "HdServiceMarterial-year",
157
164
  "popper-class": "HdServiceMarterial-selectPopper",
158
165
  placeholder: "年份",
159
166
  size: "small",
160
167
  teleport: !1,
161
- onChange: J
168
+ onChange: q
162
169
  }, {
163
- default: w(() => [(y(!0), p(c, null, x(C(L), (e) => (y(), d(_, {
170
+ default: w(() => [(y(!0), p(c, null, x(C(P), (e) => (y(), d(_, {
164
171
  key: e,
165
172
  label: `${e}年`,
166
173
  value: e
@@ -168,16 +175,16 @@ var re = {
168
175
  _: 1
169
176
  }, 8, ["modelValue"]),
170
177
  h(v, {
171
- modelValue: B.value,
172
- "onUpdate:modelValue": t[2] ||= (e) => B.value = e,
178
+ modelValue: L.value,
179
+ "onUpdate:modelValue": t[2] ||= (e) => L.value = e,
173
180
  class: "HdServiceMarterial-type",
174
181
  "popper-class": "HdServiceMarterial-selectPopper",
175
182
  placeholder: "服务类型",
176
183
  size: "small",
177
184
  teleport: !1,
178
- onChange: J
185
+ onChange: q
179
186
  }, {
180
- default: w(() => [(y(!0), p(c, null, x(P.value, (e) => (y(), d(_, {
187
+ default: w(() => [(y(!0), p(c, null, x(j.value, (e) => (y(), d(_, {
181
188
  key: e.id,
182
189
  label: e.category_name,
183
190
  value: e.id
@@ -185,8 +192,8 @@ var re = {
185
192
  _: 1
186
193
  }, 8, ["modelValue"])
187
194
  ]),
188
- m("div", le, [h(j, {
189
- data: V.value,
195
+ m("div", ue, [h(O, {
196
+ data: z.value,
190
197
  class: "HdServiceMarterial-table",
191
198
  height: "100%",
192
199
  size: "small",
@@ -200,7 +207,7 @@ var re = {
200
207
  "min-width": "40%",
201
208
  "show-overflow-tooltip": ""
202
209
  }, {
203
- default: w(({ row: e }) => [m("span", ue, S(e.title), 1)]),
210
+ default: w(({ row: e }) => [m("span", de, S(e.title), 1)]),
204
211
  _: 1
205
212
  }),
206
213
  h(b, {
@@ -215,38 +222,38 @@ var re = {
215
222
  "min-width": "30%",
216
223
  align: "center"
217
224
  }, {
218
- default: w(({ row: e }) => [m("div", de, [m("span", {
225
+ default: w(({ row: e }) => [m("div", fe, [m("span", {
219
226
  class: "HdServiceMarterial-link HdServiceMarterial-previewLink",
220
- onClick: (t) => ve(e)
221
- }, "预览", 8, fe), m("span", {
227
+ onClick: (t) => xe(e)
228
+ }, "预览", 8, pe), m("span", {
222
229
  class: "HdServiceMarterial-link HdServiceMarterial-downloadLink",
223
- onClick: (t) => ye(e)
224
- }, "下载", 8, D)])]),
230
+ onClick: (t) => Se(e)
231
+ }, "下载", 8, me)])]),
225
232
  _: 1
226
233
  })
227
234
  ]),
228
235
  _: 1
229
236
  }, 8, ["data"])]),
230
- (y(), d(l, { to: "body" }, [H.value ? (y(), p("div", {
237
+ (y(), d(l, { to: "body" }, [B.value ? (y(), p("div", {
231
238
  key: 0,
232
239
  class: "HdServiceMarterial-mask",
233
- onClick: te(X, ["self"])
234
- }, [m("div", pe, [m("div", me, [
240
+ onClick: ne(Y, ["self"])
241
+ }, [m("div", he, [m("div", ge, [
235
242
  t[6] ||= m("i", { class: "HdServiceMarterial-previewHeadBar" }, null, -1),
236
- m("span", O, S(U.value), 1),
243
+ m("span", _e, S(V.value), 1),
237
244
  m("button", {
238
245
  class: "HdServiceMarterial-previewClose",
239
- onClick: X
246
+ onClick: Y
240
247
  }, [...t[5] ||= [m("span", null, "✕", -1)]])
241
- ]), m("div", k, [(y(!0), p(c, null, x(W.value, (e, t) => (y(), p("img", {
248
+ ]), m("div", E, [(y(!0), p(c, null, x(H.value, (e, t) => (y(), p("img", {
242
249
  key: t,
243
250
  class: "HdServiceMarterial-previewImage",
244
251
  src: e,
245
252
  alt: ""
246
- }, null, 8, A))), 128))])])])) : f("", !0)]))
247
- ])), [[M, F.value]]);
253
+ }, null, 8, D))), 128))])])])) : f("", !0)]))
254
+ ])), [[k, M.value]]);
248
255
  };
249
256
  }
250
- }), [["__scopeId", "data-v-89520b3a"]]);
257
+ }), [["__scopeId", "data-v-c29a202f"]]);
251
258
  //#endregion
252
- export { j as t };
259
+ export { O as t };