sooyie-pgss 0.0.2 → 0.0.4

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 (45) hide show
  1. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  2. package/dist/apiCall-DGnOSgOg.mjs +223 -0
  3. package/dist/{app-info-BbQUujMP.mjs → app-info-CUc39-ny.mjs} +1 -1
  4. package/dist/{app-info.vue_vue_type_script_setup_true_lang-CILQM5Dm.mjs → app-info.vue_vue_type_script_setup_true_lang-CgJRP6lc.mjs} +57 -55
  5. package/dist/{constant-D4fRv058.mjs → constant--xMn450l.mjs} +6 -5
  6. package/dist/{edit-Dhe1Mlih.mjs → edit-BlxqUB6-.mjs} +5 -4
  7. package/dist/{edit-DlJbNEVn.mjs → edit-Cla0dDdI.mjs} +8 -7
  8. package/dist/edit-ivH-z1iI.mjs +436 -0
  9. package/dist/image-CROZrkNB.mjs +103 -0
  10. package/dist/index-B79zNTjd.mjs +1918 -0
  11. package/dist/index-BCe402UQ.mjs +107 -0
  12. package/dist/{index-B4yFC5Qp.mjs → index-BXMXyvNp.mjs} +24 -23
  13. package/dist/{index-CoKl3CjE.mjs → index-CFfRjdwg.mjs} +27 -26
  14. package/dist/{index-quJUd8pu.mjs → index-CRPSCe9-.mjs} +156 -152
  15. package/dist/{index-BQctarUx.mjs → index-CcJJYhrX.mjs} +27 -26
  16. package/dist/index-CeyTmMNJ.mjs +109 -0
  17. package/dist/index-Cg4ZTneB.mjs +363 -0
  18. package/dist/{index-B2aeDXDI.mjs → index-D0X52CmM.mjs} +176 -173
  19. package/dist/index-D_e-YTyb.mjs +175 -0
  20. package/dist/index-DmqVT2Yh.mjs +43857 -0
  21. package/dist/index-MA9jC8ZF.mjs +109 -0
  22. package/dist/index.mjs +3039 -4
  23. package/dist/{info-BcEJCDoh.mjs → info-CshC_g3m.mjs} +5 -4
  24. package/dist/{info-B3MSviL1.mjs → info-_AfeplKG.mjs} +45 -44
  25. package/dist/{resetPwd-C00poFAP.mjs → resetPwd-CeTAHbCm.mjs} +1 -1
  26. package/dist/{resetPwd.vue_vue_type_script_setup_true_lang-jrWExNFq.mjs → resetPwd.vue_vue_type_script_setup_true_lang-Dx51Xvte.mjs} +1 -1
  27. package/dist/{simulateNum-p0ftrVo6.mjs → simulateNum-DcFDMOSh.mjs} +1 -1
  28. package/dist/{simulateNum.vue_vue_type_script_setup_true_lang-DY_YkKUO.mjs → simulateNum.vue_vue_type_script_setup_true_lang-ALzj6Sj-.mjs} +1 -1
  29. package/dist/style.css +1 -1
  30. package/dts/src/api/pgss/index.d.ts +1 -0
  31. package/dts/src/api/pgss/pgss-user-portrait/types.d.ts +1 -1
  32. package/dts/src/constant.d.ts +1 -0
  33. package/dts/src/index.d.ts +1 -2
  34. package/dts/src/lang/pgss/zh-cn.d.ts +1 -0
  35. package/dts/src/router/index.d.ts +1 -0
  36. package/dts/src/views/pgss/pgss-app-info/edit.vue.d.ts +1 -1
  37. package/dts/src/views/pgss/pgss-login/index.vue.d.ts +2 -0
  38. package/dts/src/views/pgss/pgss-prompt-template/edit.vue.d.ts +1 -1
  39. package/dts/src/views/pgss/pgss-prompt-template-custom/edit.vue.d.ts +1 -1
  40. package/dts/src/views/pgss/pgss-user-portrait/simulateNum.vue.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/edit-DCqiYilp.mjs +0 -417
  43. package/dist/index-CRP6JuIH.mjs +0 -1932
  44. package/dist/index-D7pM0eGF.mjs +0 -47526
  45. package/dist/index-DmneBhrk.mjs +0 -326
@@ -0,0 +1,107 @@
1
+ import { defineComponent as N, ref as p, computed as i, openBlock as S, createElementBlock as D, createElementVNode as t, createTextVNode as l, toDisplayString as o, normalizeStyle as P, createVNode as _ } from "vue";
2
+ import { u as A } from "./index-CeyTmMNJ.mjs";
3
+ import { useRoute as B } from "vue-router";
4
+ import { a as T } from "./index-MA9jC8ZF.mjs";
5
+ import F from "./apiCall-DGnOSgOg.mjs";
6
+ import I from "./image-CROZrkNB.mjs";
7
+ import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ const k = { class: "dashboard-container" }, z = { class: "top-card-group" }, E = { class: "metric-card" }, R = { class: "card-value" }, $ = { class: "card-desc" }, q = { class: "metric-card" }, w = { class: "card-value" }, L = { class: "progress-bar" }, j = { class: "metric-card" }, G = { class: "card-value" }, H = { class: "metric-card" }, J = { class: "card-value" }, K = { class: "card-desc" }, M = { class: "text-red" }, O = { class: "gray-text" }, Q = { class: "bottom-card-group" }, U = /* @__PURE__ */ N({
9
+ __name: "index",
10
+ setup(W) {
11
+ const x = B(), d = p({});
12
+ function g() {
13
+ A.countTotal({ tenant: x.query.tenant }).then((e) => {
14
+ d.value = e.data || {};
15
+ }).catch((e) => {
16
+ console.error("[pgss-homepage] countTotal 调用失败:", e);
17
+ });
18
+ }
19
+ g();
20
+ const C = i(
21
+ () => (d.value.totalSize ?? 0).toLocaleString()
22
+ ), v = i(
23
+ () => Number(d.value.avgComplete ?? 0).toFixed(1)
24
+ ), c = (e) => {
25
+ var s, a;
26
+ return ((a = (s = d.value.userTypeCount) == null ? void 0 : s.find(
27
+ (n) => n.identityType === e
28
+ )) == null ? void 0 : a.identityCount) ?? 0;
29
+ }, u = (e) => e >= 1e4 ? `${(e / 1e4).toFixed(1)}万` : `${e}`, f = i(
30
+ () => u(c("natural"))
31
+ ), y = i(() => u(c("legal"))), h = i(() => u(c("other"))), m = p(0);
32
+ T.countTotal().then((e) => {
33
+ m.value = e.data.appCount ?? 0;
34
+ });
35
+ const r = p({});
36
+ T.countStatus().then((e) => {
37
+ r.value = e.data;
38
+ });
39
+ const b = i(() => {
40
+ var a, n;
41
+ const e = Number(((a = r.value) == null ? void 0 : a.useTimes) ?? 0), s = Number(((n = r.value) == null ? void 0 : n.errorTimes) ?? 0);
42
+ return e ? (s / e * 100).toFixed(2) : "0.00";
43
+ });
44
+ return (e, s) => {
45
+ var a, n;
46
+ return S(), D("div", k, [
47
+ t("div", z, [
48
+ t("div", E, [
49
+ s[1] || (s[1] = t("div", { class: "card-title" }, [
50
+ l(" 用户画像总数量 "),
51
+ t("span", { class: "tag" }, "含模拟数据")
52
+ ], -1)),
53
+ t("div", R, [
54
+ l(o(C.value) + " ", 1),
55
+ s[0] || (s[0] = t("span", { class: "unit" }, "条", -1))
56
+ ]),
57
+ t("div", $, " 自然人" + o(f.value) + " · 法人" + o(y.value) + " · 非法人组织" + o(h.value), 1)
58
+ ]),
59
+ t("div", q, [
60
+ s[3] || (s[3] = t("div", { class: "card-title" }, [
61
+ l(" 画像平均完整度 "),
62
+ t("span", { class: "tag" }, "全部画像")
63
+ ], -1)),
64
+ t("div", w, [
65
+ l(o(v.value), 1),
66
+ s[2] || (s[2] = t("span", { class: "unit" }, "%", -1))
67
+ ]),
68
+ t("div", L, [
69
+ t("div", {
70
+ class: "progress-inner",
71
+ style: P({ width: v.value + "%" })
72
+ }, null, 4)
73
+ ])
74
+ ]),
75
+ t("div", j, [
76
+ s[5] || (s[5] = t("div", { class: "card-title" }, " 已接入智能体数量 ", -1)),
77
+ t("div", G, [
78
+ l(o(m.value) + " ", 1),
79
+ s[4] || (s[4] = t("span", { class: "unit" }, "个", -1))
80
+ ])
81
+ ]),
82
+ t("div", H, [
83
+ s[7] || (s[7] = t("div", { class: "card-title" }, [
84
+ l(" 今日API调用总量 "),
85
+ t("span", { class: "tag" }, "提示词增强")
86
+ ], -1)),
87
+ t("div", J, [
88
+ l(o(((a = r.value) == null ? void 0 : a.useTimes) ?? 0), 1),
89
+ s[6] || (s[6] = t("span", { class: "unit" }, "次", -1))
90
+ ]),
91
+ t("div", K, [
92
+ t("span", M, "失败" + o(((n = r.value) == null ? void 0 : n.errorTimes) ?? 0) + "次", 1),
93
+ t("span", O, "失败率 " + o(b.value) + "%", 1)
94
+ ])
95
+ ])
96
+ ]),
97
+ t("div", Q, [
98
+ _(I),
99
+ _(F, { apiCallCountText: r.value }, null, 8, ["apiCallCountText"])
100
+ ])
101
+ ]);
102
+ };
103
+ }
104
+ }), at = /* @__PURE__ */ V(U, [["__scopeId", "data-v-7896592d"]]);
105
+ export {
106
+ at as default
107
+ };
@@ -1,39 +1,40 @@
1
1
  import { defineComponent as h, ref as r, computed as i, openBlock as T, createElementBlock as g, createElementVNode as e, toDisplayString as u, createVNode as x } from "vue";
2
- import { _ as b } from "./app-info.vue_vue_type_script_setup_true_lang-CILQM5Dm.mjs";
3
- import { a as D, _ as y } from "./index-D7pM0eGF.mjs";
4
- function d(s) {
5
- return s < 10 ? `0${s}` : `${s}`;
2
+ import { _ as D } from "./app-info.vue_vue_type_script_setup_true_lang-CgJRP6lc.mjs";
3
+ import { a as y } from "./index-MA9jC8ZF.mjs";
4
+ import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
+ function d(a) {
6
+ return a < 10 ? `0${a}` : `${a}`;
6
7
  }
7
- function N(s) {
8
- const o = s == null ? /* @__PURE__ */ new Date() : new Date(s);
8
+ function N(a) {
9
+ const o = a == null ? /* @__PURE__ */ new Date() : new Date(a);
9
10
  return isNaN(o.getTime()) ? "" : `${o.getFullYear()}-${d(o.getMonth() + 1)}-${d(o.getDate())}`;
10
11
  }
11
12
  const S = { class: "api-dashboard" }, $ = { class: "card-row" }, w = { class: "stat-card" }, C = { class: "stat-value" }, k = { class: "stat-card" }, B = { class: "stat-value" }, E = { class: "stat-card" }, F = { class: "stat-value" }, I = /* @__PURE__ */ h({
12
13
  __name: "index",
13
- setup(s) {
14
+ setup(a) {
14
15
  const o = r(0);
15
- function v(a) {
16
- o.value = a ?? 0;
16
+ function v(s) {
17
+ o.value = s ?? 0;
17
18
  }
18
- const n = r(null), l = r(!0), _ = i(() => l.value ? "--" : n.value ? (n.value.useTimes ?? 0).toLocaleString() : "0"), f = i(() => {
19
+ const n = r(null), l = r(!0), f = i(() => l.value ? "--" : n.value ? (n.value.useTimes ?? 0).toLocaleString() : "0"), _ = i(() => {
19
20
  if (l.value) return "--";
20
21
  if (!n.value) return "0.00%";
21
- const a = Number(n.value.useTimes ?? 0), t = Number(n.value.successTimes ?? 0);
22
- return a ? (t / a * 100).toFixed(2) + "%" : "0.00%";
22
+ const s = Number(n.value.useTimes ?? 0), t = Number(n.value.successTimes ?? 0);
23
+ return s ? (t / s * 100).toFixed(2) + "%" : "0.00%";
23
24
  });
24
- function p() {
25
- const a = N(/* @__PURE__ */ new Date());
26
- l.value = !0, D.countStatus({ startDate: a, endDate: a }).then((t) => {
25
+ function m() {
26
+ const s = N(/* @__PURE__ */ new Date());
27
+ l.value = !0, y.countStatus({ startDate: s, endDate: s }).then((t) => {
27
28
  var c;
28
- const m = ((c = t.data) == null ? void 0 : c.results) || [];
29
- n.value = m[0] ?? null;
29
+ const p = ((c = t.data) == null ? void 0 : c.results) || [];
30
+ n.value = p[0] ?? null;
30
31
  }).catch((t) => {
31
32
  console.error("[app-info-index] countStatus 调用失败:", t), n.value = null;
32
33
  }).finally(() => {
33
34
  l.value = !1;
34
35
  });
35
36
  }
36
- return p(), (a, t) => (T(), g("div", S, [
37
+ return m(), (s, t) => (T(), g("div", S, [
37
38
  e("div", $, [
38
39
  e("div", w, [
39
40
  t[0] || (t[0] = e("div", { class: "stat-label" }, "已接入应用", -1)),
@@ -41,17 +42,17 @@ const S = { class: "api-dashboard" }, $ = { class: "card-row" }, w = { class: "s
41
42
  ]),
42
43
  e("div", k, [
43
44
  t[1] || (t[1] = e("div", { class: "stat-label" }, "今日调用次数", -1)),
44
- e("div", B, u(_.value), 1)
45
+ e("div", B, u(f.value), 1)
45
46
  ]),
46
47
  e("div", E, [
47
48
  t[2] || (t[2] = e("div", { class: "stat-label" }, "调用成功率", -1)),
48
- e("div", F, u(f.value), 1)
49
+ e("div", F, u(_.value), 1)
49
50
  ])
50
51
  ]),
51
- x(b, { onTotalChange: v })
52
+ x(D, { onTotalChange: v })
52
53
  ]));
53
54
  }
54
- }), M = /* @__PURE__ */ y(I, [["__scopeId", "data-v-ac0bbd63"]]);
55
+ }), R = /* @__PURE__ */ b(I, [["__scopeId", "data-v-16ce6fcd"]]);
55
56
  export {
56
- M as default
57
+ R as default
57
58
  };
@@ -2,10 +2,10 @@ import { defineComponent as W, getCurrentInstance as X, ref as T, reactive as R,
2
2
  import { useTableHooks as ee } from "jmash-core";
3
3
  import { useI18n as te } from "vue-i18n";
4
4
  import { p as le } from "./index-DAKAeNie.mjs";
5
- import oe from "./edit-DCqiYilp.mjs";
6
- import "./constant-D4fRv058.mjs";
7
- import { D as ae } from "./index-B2aeDXDI.mjs";
8
- import { u as ne } from "./index-D7pM0eGF.mjs";
5
+ import oe from "./edit-ivH-z1iI.mjs";
6
+ import "./constant--xMn450l.mjs";
7
+ import { D as ae } from "./index-D0X52CmM.mjs";
8
+ import { u as ne } from "./index-CeyTmMNJ.mjs";
9
9
  import { useRoute as me } from "vue-router";
10
10
  const se = { class: "app-container" }, re = { class: "search-container" }, pe = ["onClick"], ue = ["onClick"], ke = /* @__PURE__ */ W({
11
11
  __name: "index",
@@ -17,9 +17,9 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
17
17
  }), {
18
18
  tableHooks: m,
19
19
  multipleTableRef: P,
20
- queryFormRef: q,
21
- listLoading: z,
22
- tableData: E,
20
+ queryFormRef: Q,
21
+ listLoading: q,
22
+ tableData: z,
23
23
  total: b
24
24
  } = ee(v, le, r);
25
25
  let c = T([
@@ -63,19 +63,19 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
63
63
  isColumn: !0
64
64
  }
65
65
  ]);
66
- const I = T([]);
66
+ const E = T([]);
67
67
  ne.findFields().then(({ data: l }) => {
68
- console.log(l), I.value = l.results;
68
+ console.log(l), E.value = l.results;
69
69
  });
70
70
  const p = T({
71
71
  title: v("common.edit"),
72
72
  visible: !1
73
73
  });
74
74
  let C = R({});
75
- function L() {
75
+ function I() {
76
76
  C = R({}), p.value.title = v("common.add"), p.value.visible = !0;
77
77
  }
78
- function Q(l) {
78
+ function L(l) {
79
79
  C.templateId = l.templateId, p.value.title = v("common.edit"), p.value.visible = !0;
80
80
  }
81
81
  function H(l) {
@@ -93,7 +93,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
93
93
  $("div", re, [
94
94
  a(F, {
95
95
  ref_key: "queryFormRef",
96
- ref: q,
96
+ ref: Q,
97
97
  model: r.value,
98
98
  inline: !0
99
99
  }, {
@@ -133,6 +133,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
133
133
  placeholder: l.$t("promptTemplate.statusRequired"),
134
134
  onKeyup: t[3] || (t[3] = D((e) => n(m).handleQuery(), ["enter"])),
135
135
  data: n(ae).statusEnum.values,
136
+ onChange: t[4] || (t[4] = (e) => n(m).handleQuery()),
136
137
  clearable: "",
137
138
  class: "!w-[203px]"
138
139
  }, null, 8, ["modelValue", "placeholder", "data"])
@@ -148,7 +149,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
148
149
  default: o(() => [
149
150
  a(_, {
150
151
  type: "primary",
151
- onClick: t[4] || (t[4] = (e) => n(m).handleQuery())
152
+ onClick: t[5] || (t[5] = (e) => n(m).handleQuery())
152
153
  }, {
153
154
  default: o(() => [
154
155
  d(i(l.$t("common.search")), 1)
@@ -156,7 +157,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
156
157
  _: 1
157
158
  }),
158
159
  a(_, {
159
- onClick: t[5] || (t[5] = (e) => n(m).resetQuery())
160
+ onClick: t[6] || (t[6] = (e) => n(m).resetQuery())
160
161
  }, {
161
162
  default: o(() => [
162
163
  d(i(l.$t("common.reset")), 1)
@@ -175,7 +176,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
175
176
  ]),
176
177
  _: 1
177
178
  }, 8, ["model"]),
178
- t[13] || (t[13] = $("div", { class: "clear" }, null, -1))
179
+ t[14] || (t[14] = $("div", { class: "clear" }, null, -1))
179
180
  ]),
180
181
  a(O, {
181
182
  shadow: "never",
@@ -188,7 +189,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
188
189
  default: o(() => [
189
190
  k((u(), w(_, {
190
191
  type: "primary",
191
- onClick: L
192
+ onClick: I
192
193
  }, {
193
194
  default: o(() => [
194
195
  d(i(l.$t("promptTemplate.add")), 1)
@@ -199,7 +200,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
199
200
  ]),
200
201
  k((u(), w(_, {
201
202
  type: "primary",
202
- onClick: t[6] || (t[6] = (e) => n(m).deleteRecords())
203
+ onClick: t[7] || (t[7] = (e) => n(m).deleteRecords())
203
204
  }, {
204
205
  default: o(() => [
205
206
  d(i(l.$t("common.batchDelete")), 1)
@@ -218,7 +219,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
218
219
  default: o(() => [
219
220
  a(M, {
220
221
  modelValue: n(c),
221
- "onUpdate:modelValue": t[7] || (t[7] = (e) => S(c) ? c.value = e : c = e),
222
+ "onUpdate:modelValue": t[8] || (t[8] = (e) => S(c) ? c.value = e : c = e),
222
223
  "label-name": "pgss/pgss-prompt-template"
223
224
  }, null, 8, ["modelValue"])
224
225
  ]),
@@ -232,12 +233,12 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
232
233
  n(b) > 0 ? (u(), w(J, {
233
234
  key: 0,
234
235
  total: n(b),
235
- "onUpdate:total": t[8] || (t[8] = (e) => S(b) ? b.value = e : null),
236
+ "onUpdate:total": t[9] || (t[9] = (e) => S(b) ? b.value = e : null),
236
237
  "current-page": r.value.curPage,
237
- "onUpdate:currentPage": t[9] || (t[9] = (e) => r.value.curPage = e),
238
+ "onUpdate:currentPage": t[10] || (t[10] = (e) => r.value.curPage = e),
238
239
  "page-size": r.value.pageSize,
239
- "onUpdate:pageSize": t[10] || (t[10] = (e) => r.value.pageSize = e),
240
- onPagination: t[11] || (t[11] = (e) => n(m).getList())
240
+ "onUpdate:pageSize": t[11] || (t[11] = (e) => r.value.pageSize = e),
241
+ onPagination: t[12] || (t[12] = (e) => n(m).getList())
241
242
  }, null, 8, ["total", "current-page", "page-size"])) : U("", !0)
242
243
  ]),
243
244
  default: o(() => [
@@ -245,8 +246,8 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
245
246
  ref_key: "multipleTableRef",
246
247
  ref: P,
247
248
  "row-key": "templateId",
248
- "list-loading": n(z),
249
- data: n(E),
249
+ "list-loading": n(q),
250
+ data: n(z),
250
251
  "table-label": n(c),
251
252
  onSelectionChange: H,
252
253
  onSortChange: K
@@ -267,7 +268,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
267
268
  operation: o((e) => [
268
269
  k((u(), V("span", {
269
270
  class: "el-button-color",
270
- onClick: (y) => Q(e.data.row)
271
+ onClick: (y) => L(e.data.row)
271
272
  }, [
272
273
  d(i(l.$t("common.edit")), 1)
273
274
  ], 8, pe)), [
@@ -290,7 +291,7 @@ const se = { class: "app-container" }, re = { class: "search-container" }, pe =
290
291
  p.value.visible ? (u(), w(oe, {
291
292
  key: 0,
292
293
  modelValue: p.value.visible,
293
- "onUpdate:modelValue": t[12] || (t[12] = (e) => p.value.visible = e),
294
+ "onUpdate:modelValue": t[13] || (t[13] = (e) => p.value.visible = e),
294
295
  title: p.value.title,
295
296
  "entity-key": n(C),
296
297
  onRefresh: Y,