sooyie-pgss 0.0.8 → 0.0.10

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 (29) hide show
  1. package/dist/{edit-DC2jf7oH.mjs → edit-By9buUGg.mjs} +1 -1
  2. package/dist/{edit-DPZ2KRCd.mjs → edit-DxDpftpV.mjs} +1 -1
  3. package/dist/{history-xRxkIYRN.mjs → history-d-QiRe_o.mjs} +1 -1
  4. package/dist/{index-C0DLTypb.mjs → index-ByT0tywU.mjs} +2 -2
  5. package/dist/{index-DRytYmLN.mjs → index-BykLuLsz.mjs} +1 -1
  6. package/dist/index-D1Alu84X.mjs +191 -0
  7. package/dist/{index-DMVIfzsH.mjs → index-DCY0SbK2.mjs} +67 -37
  8. package/dist/index-Ge5nHDkt.mjs +408 -0
  9. package/dist/{index-BhzzZN5S.mjs → index-HBIIK6iA.mjs} +1 -1
  10. package/dist/index.mjs +148 -96
  11. package/dist/{info-CkB6TQua.mjs → info-CAk_CRho.mjs} +1 -1
  12. package/dist/style.css +1 -1
  13. package/dts/src/api/pgss/pgss-chat/types.d.ts +3 -0
  14. package/dts/src/api/pgss/pgss-deny-file/index.d.ts +10 -0
  15. package/dts/src/api/pgss/pgss-deny-file/index.js +38 -0
  16. package/dts/src/api/pgss/pgss-deny-file/type.d.ts +11 -0
  17. package/dts/src/api/pgss/pgss-deny-file/type.js +1 -0
  18. package/dts/src/lang/pgss/en.d.ts +26 -0
  19. package/dts/src/lang/pgss/en.js +26 -0
  20. package/dts/src/lang/pgss/zh-cn.d.ts +26 -0
  21. package/dts/src/lang/pgss/zh-cn.js +26 -0
  22. package/dts/src/utils/fileutil.d.ts +4 -0
  23. package/dts/src/utils/fileutil.js +15 -0
  24. package/dts/src/views/pgss/pgss-chat/index.vue.js +18 -2
  25. package/dts/src/views/pgss/pgss-homepage/apiCall.vue.js +0 -74
  26. package/dts/src/views/pgss/pgss-sensitive-word/index.vue.d.ts +2 -0
  27. package/dts/src/views/pgss/pgss-sensitive-word/index.vue.js +315 -0
  28. package/package.json +1 -1
  29. package/dist/index-Dew2HmWi.mjs +0 -401
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as oe, ref as R, reactive as B, computed as N, useModel as ae, resolveComponent as d, openBlock as m, createBlock as P, withCtx as i, createVNode as a, unref as p, createElementVNode as o, createElementBlock as f, Fragment as h, renderList as y, createTextVNode as C, toDisplayString as _, createCommentVNode as se, mergeModels as K, nextTick as ne } from "vue";
2
2
  import { ElMessage as H } from "element-plus";
3
- import { a as re } from "./index-DMVIfzsH.mjs";
3
+ import { a as re } from "./index-DCY0SbK2.mjs";
4
4
  import { useI18n as ie } from "vue-i18n";
5
5
  import { D as V, p as D } from "./index-Cc_rS2lk.mjs";
6
6
  import { u as pe } from "./index-CeyTmMNJ.mjs";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as oe, ref as $, reactive as O, computed as R, useModel as ae, resolveComponent as d, openBlock as c, createBlock as B, withCtx as s, createVNode as l, unref as i, createElementVNode as p, createElementBlock as _, Fragment as T, renderList as V, createTextVNode as v, toDisplayString as g, createCommentVNode as se, mergeModels as P, nextTick as ne } from "vue";
2
2
  import { ElMessage as K } from "element-plus";
3
- import { a as re } from "./index-DMVIfzsH.mjs";
3
+ import { a as re } from "./index-DCY0SbK2.mjs";
4
4
  import { useI18n as pe } from "vue-i18n";
5
5
  import { D as w, p as S } from "./index-Cc_rS2lk.mjs";
6
6
  import { u as ie } from "./index-CeyTmMNJ.mjs";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as F, getCurrentInstance as U, ref as v, onMounted as A, resolveComponent as m, resolveDirective as R, openBlock as u, createElementBlock as h, createElementVNode as l, toDisplayString as a, createVNode as t, withCtx as n, unref as r, withDirectives as j, createCommentVNode as q, Fragment as G, renderList as J, normalizeClass as K, withModifiers as x, createTextVNode as D } from "vue";
2
- import { r as O, c as P, m as Q, e as W, d as X } from "./index-DMVIfzsH.mjs";
2
+ import { r as O, c as P, m as Q, e as W, d as X } from "./index-DCY0SbK2.mjs";
3
3
  import { ElMessageBox as Z, ElMessage as T } from "element-plus";
4
4
  import { useI18n as ee } from "vue-i18n";
5
5
  import { _ as te, c as B } from "./rename.vue_vue_type_script_setup_true_lang-CAXpy7Ny.mjs";
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as le, ref as S, getCurrentInstance as oe, reactive as ae, resolveComponent as d, resolveDirective as se, openBlock as p, createElementBlock as N, createElementVNode as n, createVNode as a, withCtx as o, withKeys as k, unref as l, createTextVNode as f, toDisplayString as r, withDirectives as $, normalizeClass as I, normalizeStyle as ne, createBlock as y, isRef as F, createCommentVNode as E } from "vue";
2
2
  import { useTableHooks as re } from "jmash-core";
3
3
  import { useI18n as ie } from "vue-i18n";
4
- import { u as ue, o as de, s as me } from "./index-DMVIfzsH.mjs";
4
+ import { u as ue, o as de, s as me } from "./index-DCY0SbK2.mjs";
5
5
  import { u as pe } from "./index-CeyTmMNJ.mjs";
6
- import ce from "./info-CkB6TQua.mjs";
6
+ import ce from "./info-CAk_CRho.mjs";
7
7
  import { _ as ye } from "./simulateNum.vue_vue_type_script_setup_true_lang-ALzj6Sj-.mjs";
8
8
  import { D as m } from "./index-Cc_rS2lk.mjs";
9
9
  import { C as fe } from "./constant-KIlcvlH7.mjs";
@@ -2,7 +2,7 @@ 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, D as oe } from "./index-Cc_rS2lk.mjs";
5
- import ae from "./edit-DC2jf7oH.mjs";
5
+ import ae from "./edit-By9buUGg.mjs";
6
6
  import "./constant-KIlcvlH7.mjs";
7
7
  import { u as ne } from "./index-CeyTmMNJ.mjs";
8
8
  import { useRoute as me } from "vue-router";
@@ -0,0 +1,191 @@
1
+ import { defineComponent as S, ref as m, resolveComponent as i, openBlock as $, createElementBlock as j, createVNode as n, withCtx as s, createElementVNode as d, unref as b, toDisplayString as _, createTextVNode as U } from "vue";
2
+ import { useUserStore as h, clearEmpty as w, request as g, fileApi as D } from "jmash-core";
3
+ import { ElMessage as p } from "element-plus";
4
+ import { useI18n as O } from "vue-i18n";
5
+ import { i as L, b as A } from "./index-DCY0SbK2.mjs";
6
+ import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
+ class H {
8
+ getKey(e) {
9
+ return {};
10
+ }
11
+ // 读取内置文件
12
+ readDictFile(e) {
13
+ return e.tenant = h().user.tenant, w(e), g({
14
+ url: "/v1/pgss/dict_file/read/" + e.tenant,
15
+ method: "get",
16
+ params: e
17
+ });
18
+ }
19
+ // 自定义敏感词
20
+ readCustomFile(e) {
21
+ return e.tenant = h().user.tenant, w(e), g({
22
+ url: "/v1/pgss/deny_file/read/" + e.tenant,
23
+ method: "get",
24
+ params: e
25
+ });
26
+ }
27
+ // 保存自定义敏感词
28
+ saveCustomFile(e) {
29
+ return e.tenant = h().user.tenant, w(e), g({
30
+ url: "/v1/pgss/txt_file/write",
31
+ method: "put",
32
+ data: e
33
+ });
34
+ }
35
+ }
36
+ const V = new H(), K = { class: "app-container" }, M = { class: "builtin-tip" }, P = { class: "builtin-tip__text" }, z = { class: "custom-actions" }, G = { class: "builtin-tip" }, J = { class: "builtin-tip__text" }, y = "/data/jmash/file/pgss/sensitive/sensitive_word_dict.txt", E = "/data/jmash/file/", Q = /* @__PURE__ */ S({
37
+ __name: "index",
38
+ setup(T) {
39
+ const { t: e } = O(), C = m("custom");
40
+ async function x() {
41
+ try {
42
+ const t = y.startsWith(E) ? y.slice(E.length) : y, o = D.fileUrl(t), a = await fetch(o);
43
+ if (!a.ok)
44
+ throw new Error(`下载失败:HTTP ${a.status}`);
45
+ const f = await a.blob(), c = URL.createObjectURL(f), l = document.createElement("a");
46
+ l.href = c, l.download = "内置敏感词文件.txt", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(c);
47
+ } catch (t) {
48
+ console.error("下载内置敏感词失败", t), p.error(e("sensitiveWord.downloadFail"));
49
+ }
50
+ }
51
+ const r = m({
52
+ content: "",
53
+ fileName: ""
54
+ }), W = m(!1);
55
+ async function k() {
56
+ try {
57
+ const t = await V.readCustomFile({ tenant: "" });
58
+ r.value = t.data ?? { content: "", fileName: "" };
59
+ } catch (t) {
60
+ console.error("加载自定义敏感词失败", t), r.value = { content: "", fileName: "" };
61
+ } finally {
62
+ W.value = !1;
63
+ }
64
+ }
65
+ k();
66
+ const u = m(!1);
67
+ async function I() {
68
+ var t;
69
+ if (!((t = r.value.content) != null && t.trim())) {
70
+ p.warning(e("sensitiveWord.contentRequired"));
71
+ return;
72
+ }
73
+ if (!u.value) {
74
+ u.value = !0;
75
+ try {
76
+ const o = {
77
+ content: r.value.content
78
+ };
79
+ await V.saveCustomFile(o), p.success(e("sensitiveWord.saveSuccess")), await k();
80
+ } catch (o) {
81
+ console.error("保存自定义敏感词失败:", o), p.error(e("sensitiveWord.saveFail"));
82
+ } finally {
83
+ u.value = !1;
84
+ }
85
+ }
86
+ }
87
+ return (t, o) => {
88
+ const a = i("el-icon"), f = i("el-input"), c = i("el-button"), l = i("el-skeleton"), F = i("el-tab-pane"), N = i("el-tabs"), R = i("el-card");
89
+ return $(), j("div", K, [
90
+ n(R, {
91
+ shadow: "never",
92
+ class: "word-card"
93
+ }, {
94
+ default: s(() => [
95
+ n(N, {
96
+ modelValue: C.value,
97
+ "onUpdate:modelValue": o[1] || (o[1] = (v) => C.value = v),
98
+ class: "word-tabs"
99
+ }, {
100
+ default: s(() => [
101
+ n(F, {
102
+ label: t.$t("sensitiveWord.custom"),
103
+ name: "custom"
104
+ }, {
105
+ default: s(() => [
106
+ d("div", M, [
107
+ n(a, { class: "builtin-tip__icon" }, {
108
+ default: s(() => [
109
+ n(b(L))
110
+ ]),
111
+ _: 1
112
+ }),
113
+ d("span", P, _(t.$t("sensitiveWord.customTip")), 1)
114
+ ]),
115
+ n(l, {
116
+ loading: W.value,
117
+ animated: ""
118
+ }, {
119
+ default: s(() => [
120
+ n(f, {
121
+ modelValue: r.value.content,
122
+ "onUpdate:modelValue": o[0] || (o[0] = (v) => r.value.content = v),
123
+ type: "textarea",
124
+ rows: "10",
125
+ class: "custom-content"
126
+ }, null, 8, ["modelValue"]),
127
+ d("div", z, [
128
+ n(c, {
129
+ type: "primary",
130
+ loading: u.value,
131
+ onClick: I
132
+ }, {
133
+ default: s(() => [
134
+ U(_(t.$t("sensitiveWord.save")), 1)
135
+ ]),
136
+ _: 1
137
+ }, 8, ["loading"])
138
+ ])
139
+ ]),
140
+ _: 1
141
+ }, 8, ["loading"])
142
+ ]),
143
+ _: 1
144
+ }, 8, ["label"]),
145
+ n(F, {
146
+ label: t.$t("sensitiveWord.builtin"),
147
+ name: "builtin"
148
+ }, {
149
+ default: s(() => [
150
+ d("div", G, [
151
+ n(a, { class: "builtin-tip__icon" }, {
152
+ default: s(() => [
153
+ n(b(L))
154
+ ]),
155
+ _: 1
156
+ }),
157
+ d("span", J, _(t.$t("sensitiveWord.builtinTip")), 1),
158
+ n(c, {
159
+ type: "primary",
160
+ link: "",
161
+ class: "builtin-tip__action",
162
+ onClick: x
163
+ }, {
164
+ default: s(() => [
165
+ n(a, null, {
166
+ default: s(() => [
167
+ n(b(A))
168
+ ]),
169
+ _: 1
170
+ }),
171
+ U(" " + _(t.$t("sensitiveWord.download")), 1)
172
+ ]),
173
+ _: 1
174
+ })
175
+ ])
176
+ ]),
177
+ _: 1
178
+ }, 8, ["label"])
179
+ ]),
180
+ _: 1
181
+ }, 8, ["modelValue"])
182
+ ]),
183
+ _: 1
184
+ })
185
+ ]);
186
+ };
187
+ }
188
+ }), ne = /* @__PURE__ */ B(Q, [["__scopeId", "data-v-7eb20ea5"]]);
189
+ export {
190
+ ne as default
191
+ };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as e, openBlock as t, createElementBlock as r, createElementVNode as a } from "vue";
2
2
  /*! Element Plus Icons Vue v2.3.2 */
3
- var o = /* @__PURE__ */ e({
3
+ var s = /* @__PURE__ */ e({
4
4
  name: "ChatDotRound",
5
5
  __name: "chat-dot-round",
6
6
  setup(l) {
7
- return (_, s) => (t(), r("svg", {
7
+ return (_, o) => (t(), r("svg", {
8
8
  xmlns: "http://www.w3.org/2000/svg",
9
9
  viewBox: "0 0 1024 1024"
10
10
  }, [
@@ -18,11 +18,11 @@ var o = /* @__PURE__ */ e({
18
18
  })
19
19
  ]));
20
20
  }
21
- }), x = o, n = /* @__PURE__ */ e({
21
+ }), H = s, n = /* @__PURE__ */ e({
22
22
  name: "Clock",
23
23
  __name: "clock",
24
24
  setup(l) {
25
- return (_, s) => (t(), r("svg", {
25
+ return (_, o) => (t(), r("svg", {
26
26
  xmlns: "http://www.w3.org/2000/svg",
27
27
  viewBox: "0 0 1024 1024"
28
28
  }, [
@@ -40,11 +40,11 @@ var o = /* @__PURE__ */ e({
40
40
  })
41
41
  ]));
42
42
  }
43
- }), z = n, m = /* @__PURE__ */ e({
43
+ }), C = n, c = /* @__PURE__ */ e({
44
44
  name: "Delete",
45
45
  __name: "delete",
46
46
  setup(l) {
47
- return (_, s) => (t(), r("svg", {
47
+ return (_, o) => (t(), r("svg", {
48
48
  xmlns: "http://www.w3.org/2000/svg",
49
49
  viewBox: "0 0 1024 1024"
50
50
  }, [
@@ -54,11 +54,11 @@ var o = /* @__PURE__ */ e({
54
54
  })
55
55
  ]));
56
56
  }
57
- }), H = m, c = /* @__PURE__ */ e({
57
+ }), M = c, m = /* @__PURE__ */ e({
58
58
  name: "Document",
59
59
  __name: "document",
60
60
  setup(l) {
61
- return (_, s) => (t(), r("svg", {
61
+ return (_, o) => (t(), r("svg", {
62
62
  xmlns: "http://www.w3.org/2000/svg",
63
63
  viewBox: "0 0 1024 1024"
64
64
  }, [
@@ -68,11 +68,25 @@ var o = /* @__PURE__ */ e({
68
68
  })
69
69
  ]));
70
70
  }
71
- }), C = c, h = /* @__PURE__ */ e({
71
+ }), V = m, h = /* @__PURE__ */ e({
72
+ name: "Download",
73
+ __name: "download",
74
+ setup(l) {
75
+ return (_, o) => (t(), r("svg", {
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ viewBox: "0 0 1024 1024"
78
+ }, [
79
+ a("path", {
80
+ fill: "currentColor",
81
+ d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
82
+ })
83
+ ]));
84
+ }
85
+ }), B = h, v = /* @__PURE__ */ e({
72
86
  name: "EditPen",
73
87
  __name: "edit-pen",
74
88
  setup(l) {
75
- return (_, s) => (t(), r("svg", {
89
+ return (_, o) => (t(), r("svg", {
76
90
  xmlns: "http://www.w3.org/2000/svg",
77
91
  viewBox: "0 0 1024 1024"
78
92
  }, [
@@ -82,11 +96,25 @@ var o = /* @__PURE__ */ e({
82
96
  })
83
97
  ]));
84
98
  }
85
- }), M = h, v = /* @__PURE__ */ e({
99
+ }), L = v, p = /* @__PURE__ */ e({
100
+ name: "InfoFilled",
101
+ __name: "info-filled",
102
+ setup(l) {
103
+ return (_, o) => (t(), r("svg", {
104
+ xmlns: "http://www.w3.org/2000/svg",
105
+ viewBox: "0 0 1024 1024"
106
+ }, [
107
+ a("path", {
108
+ fill: "currentColor",
109
+ d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
110
+ })
111
+ ]));
112
+ }
113
+ }), k = p, i = /* @__PURE__ */ e({
86
114
  name: "MoreFilled",
87
115
  __name: "more-filled",
88
116
  setup(l) {
89
- return (_, s) => (t(), r("svg", {
117
+ return (_, o) => (t(), r("svg", {
90
118
  xmlns: "http://www.w3.org/2000/svg",
91
119
  viewBox: "0 0 1024 1024"
92
120
  }, [
@@ -96,11 +124,11 @@ var o = /* @__PURE__ */ e({
96
124
  })
97
125
  ]));
98
126
  }
99
- }), V = v, p = /* @__PURE__ */ e({
127
+ }), A = i, u = /* @__PURE__ */ e({
100
128
  name: "OfficeBuilding",
101
129
  __name: "office-building",
102
130
  setup(l) {
103
- return (_, s) => (t(), r("svg", {
131
+ return (_, o) => (t(), r("svg", {
104
132
  xmlns: "http://www.w3.org/2000/svg",
105
133
  viewBox: "0 0 1024 1024"
106
134
  }, [
@@ -118,11 +146,11 @@ var o = /* @__PURE__ */ e({
118
146
  })
119
147
  ]));
120
148
  }
121
- }), B = p, u = /* @__PURE__ */ e({
149
+ }), D = u, w = /* @__PURE__ */ e({
122
150
  name: "Refresh",
123
151
  __name: "refresh",
124
152
  setup(l) {
125
- return (_, s) => (t(), r("svg", {
153
+ return (_, o) => (t(), r("svg", {
126
154
  xmlns: "http://www.w3.org/2000/svg",
127
155
  viewBox: "0 0 1024 1024"
128
156
  }, [
@@ -132,11 +160,11 @@ var o = /* @__PURE__ */ e({
132
160
  })
133
161
  ]));
134
162
  }
135
- }), k = u, i = /* @__PURE__ */ e({
163
+ }), b = w, f = /* @__PURE__ */ e({
136
164
  name: "Share",
137
165
  __name: "share",
138
166
  setup(l) {
139
- return (_, s) => (t(), r("svg", {
167
+ return (_, o) => (t(), r("svg", {
140
168
  xmlns: "http://www.w3.org/2000/svg",
141
169
  viewBox: "0 0 1024 1024"
142
170
  }, [
@@ -146,11 +174,11 @@ var o = /* @__PURE__ */ e({
146
174
  })
147
175
  ]));
148
176
  }
149
- }), L = i, w = /* @__PURE__ */ e({
177
+ }), E = f, d = /* @__PURE__ */ e({
150
178
  name: "Star",
151
179
  __name: "star",
152
180
  setup(l) {
153
- return (_, s) => (t(), r("svg", {
181
+ return (_, o) => (t(), r("svg", {
154
182
  xmlns: "http://www.w3.org/2000/svg",
155
183
  viewBox: "0 0 1024 1024"
156
184
  }, [
@@ -160,11 +188,11 @@ var o = /* @__PURE__ */ e({
160
188
  })
161
189
  ]));
162
190
  }
163
- }), A = w, f = /* @__PURE__ */ e({
191
+ }), S = d, g = /* @__PURE__ */ e({
164
192
  name: "Tickets",
165
193
  __name: "tickets",
166
194
  setup(l) {
167
- return (_, s) => (t(), r("svg", {
195
+ return (_, o) => (t(), r("svg", {
168
196
  xmlns: "http://www.w3.org/2000/svg",
169
197
  viewBox: "0 0 1024 1024"
170
198
  }, [
@@ -174,11 +202,11 @@ var o = /* @__PURE__ */ e({
174
202
  })
175
203
  ]));
176
204
  }
177
- }), b = f, d = /* @__PURE__ */ e({
205
+ }), q = g, x = /* @__PURE__ */ e({
178
206
  name: "User",
179
207
  __name: "user",
180
208
  setup(l) {
181
- return (_, s) => (t(), r("svg", {
209
+ return (_, o) => (t(), r("svg", {
182
210
  xmlns: "http://www.w3.org/2000/svg",
183
211
  viewBox: "0 0 1024 1024"
184
212
  }, [
@@ -188,18 +216,20 @@ var o = /* @__PURE__ */ e({
188
216
  })
189
217
  ]));
190
218
  }
191
- }), D = d;
219
+ }), F = x;
192
220
  export {
193
- C as a,
194
- A as b,
195
- x as c,
196
- H as d,
197
- M as e,
198
- z as f,
199
- V as m,
200
- B as o,
201
- k as r,
202
- L as s,
203
- b as t,
204
- D as u
221
+ V as a,
222
+ B as b,
223
+ H as c,
224
+ M as d,
225
+ L as e,
226
+ S as f,
227
+ C as g,
228
+ k as i,
229
+ A as m,
230
+ D as o,
231
+ b as r,
232
+ E as s,
233
+ q as t,
234
+ F as u
205
235
  };