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.
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/apiCall-DGnOSgOg.mjs +223 -0
- package/dist/{app-info-BbQUujMP.mjs → app-info-CUc39-ny.mjs} +1 -1
- 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
- package/dist/{constant-D4fRv058.mjs → constant--xMn450l.mjs} +6 -5
- package/dist/{edit-Dhe1Mlih.mjs → edit-BlxqUB6-.mjs} +5 -4
- package/dist/{edit-DlJbNEVn.mjs → edit-Cla0dDdI.mjs} +8 -7
- package/dist/edit-ivH-z1iI.mjs +436 -0
- package/dist/image-CROZrkNB.mjs +103 -0
- package/dist/index-B79zNTjd.mjs +1918 -0
- package/dist/index-BCe402UQ.mjs +107 -0
- package/dist/{index-B4yFC5Qp.mjs → index-BXMXyvNp.mjs} +24 -23
- package/dist/{index-CoKl3CjE.mjs → index-CFfRjdwg.mjs} +27 -26
- package/dist/{index-quJUd8pu.mjs → index-CRPSCe9-.mjs} +156 -152
- package/dist/{index-BQctarUx.mjs → index-CcJJYhrX.mjs} +27 -26
- package/dist/index-CeyTmMNJ.mjs +109 -0
- package/dist/index-Cg4ZTneB.mjs +363 -0
- package/dist/{index-B2aeDXDI.mjs → index-D0X52CmM.mjs} +176 -173
- package/dist/index-D_e-YTyb.mjs +175 -0
- package/dist/index-DmqVT2Yh.mjs +43857 -0
- package/dist/index-MA9jC8ZF.mjs +109 -0
- package/dist/index.mjs +3039 -4
- package/dist/{info-BcEJCDoh.mjs → info-CshC_g3m.mjs} +5 -4
- package/dist/{info-B3MSviL1.mjs → info-_AfeplKG.mjs} +45 -44
- package/dist/{resetPwd-C00poFAP.mjs → resetPwd-CeTAHbCm.mjs} +1 -1
- package/dist/{resetPwd.vue_vue_type_script_setup_true_lang-jrWExNFq.mjs → resetPwd.vue_vue_type_script_setup_true_lang-Dx51Xvte.mjs} +1 -1
- package/dist/{simulateNum-p0ftrVo6.mjs → simulateNum-DcFDMOSh.mjs} +1 -1
- 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
- package/dist/style.css +1 -1
- package/dts/src/api/pgss/index.d.ts +1 -0
- package/dts/src/api/pgss/pgss-user-portrait/types.d.ts +1 -1
- package/dts/src/constant.d.ts +1 -0
- package/dts/src/index.d.ts +1 -2
- package/dts/src/lang/pgss/zh-cn.d.ts +1 -0
- package/dts/src/router/index.d.ts +1 -0
- package/dts/src/views/pgss/pgss-app-info/edit.vue.d.ts +1 -1
- package/dts/src/views/pgss/pgss-login/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-prompt-template/edit.vue.d.ts +1 -1
- package/dts/src/views/pgss/pgss-prompt-template-custom/edit.vue.d.ts +1 -1
- package/dts/src/views/pgss/pgss-user-portrait/simulateNum.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/edit-DCqiYilp.mjs +0 -417
- package/dist/index-CRP6JuIH.mjs +0 -1932
- package/dist/index-D7pM0eGF.mjs +0 -47526
- package/dist/index-DmneBhrk.mjs +0 -326
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { defineComponent as oe, ref as R, reactive as B, computed as V, useModel as ae, resolveComponent as m, openBlock as d, createBlock as P, withCtx as i, createVNode as a, unref as p, createElementVNode as o, createElementBlock as f, Fragment as h, renderList as C, createTextVNode as y, toDisplayString as g, createCommentVNode as se, mergeModels as K, nextTick as re } from "vue";
|
|
2
|
+
import { ElMessage as H } from "element-plus";
|
|
3
|
+
import { d as ne } from "./index-CkVsz6yH.mjs";
|
|
4
|
+
import { useI18n as ie } from "vue-i18n";
|
|
5
|
+
import { p as D } from "./index-DAKAeNie.mjs";
|
|
6
|
+
import { D as k } from "./index-D0X52CmM.mjs";
|
|
7
|
+
import { u as pe } from "./index-CeyTmMNJ.mjs";
|
|
8
|
+
import { C as me } from "./constant--xMn450l.mjs";
|
|
9
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
10
|
+
const ue = { class: "form-section" }, ce = { class: "form-section" }, fe = { class: "variable-palette" }, ge = { class: "palette-label" }, _e = { class: "palette-pills" }, ve = ["onClick"], he = { class: "variable-palette" }, Ce = { class: "palette-row" }, ye = { class: "palette-pills" }, be = ["onClick"], Te = { class: "variable-palette" }, we = { class: "template-footer" }, Ne = { class: "char-count" }, Ve = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "referenced-placeholders"
|
|
13
|
+
}, ke = { class: "form-section" }, qe = { class: "sample-preview" }, $e = { class: "sample-header" }, Re = { class: "sample-header-left" }, De = { class: "sample-header-right" }, Fe = { class: "sample-meta" }, Se = ["innerHTML"], Ee = { class: "dialog-footer" }, Me = /* @__PURE__ */ oe({
|
|
14
|
+
__name: "edit",
|
|
15
|
+
props: /* @__PURE__ */ K({
|
|
16
|
+
entityKey: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, {
|
|
22
|
+
modelValue: { type: Boolean },
|
|
23
|
+
modelModifiers: {}
|
|
24
|
+
}),
|
|
25
|
+
emits: /* @__PURE__ */ K(["refresh"], ["update:modelValue"]),
|
|
26
|
+
setup(F, { emit: z }) {
|
|
27
|
+
const { t: u } = ie(), S = R();
|
|
28
|
+
let s = B({
|
|
29
|
+
requestId: Math.random() * 10 + "",
|
|
30
|
+
updateMask: "weightCode,templateCode,templateName,templateContent,templateSample,priorityNo",
|
|
31
|
+
templateType: "common"
|
|
32
|
+
});
|
|
33
|
+
console.log(k.commonFieldDict.values, "=>Dict.commonFieldDict.values ");
|
|
34
|
+
const E = R([]);
|
|
35
|
+
pe.findFields().then(({ data: t }) => {
|
|
36
|
+
E.value = t.results || [];
|
|
37
|
+
});
|
|
38
|
+
const G = V(() => {
|
|
39
|
+
const t = k.profileCodeDict.values || [], e = E.value || [];
|
|
40
|
+
return t.map((n) => {
|
|
41
|
+
const c = n.dictCode, v = e.filter((b) => {
|
|
42
|
+
var T;
|
|
43
|
+
return console.log(b, "=>f "), ((T = b.fieldName) == null ? void 0 : T.split("_")[0]) === c;
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
dictCode: n.dictCode,
|
|
47
|
+
dictName: n.dictName,
|
|
48
|
+
fields: v
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}), W = V(
|
|
52
|
+
() => (k.commonFieldDict.values || []).map((t) => ({
|
|
53
|
+
fieldName: t.dictCode,
|
|
54
|
+
fieldRemark: t.dictName
|
|
55
|
+
}))
|
|
56
|
+
), q = V(() => {
|
|
57
|
+
const t = s.templateContent || "", e = /\((\w+\.\w+)\)/g, r = /* @__PURE__ */ new Set();
|
|
58
|
+
let n;
|
|
59
|
+
for (; (n = e.exec(t)) !== null; )
|
|
60
|
+
r.add(n[1]);
|
|
61
|
+
return Array.from(r);
|
|
62
|
+
}), M = {}, J = V(() => {
|
|
63
|
+
let t = s.templateContent || "";
|
|
64
|
+
return t ? (Object.keys(M).forEach((e) => {
|
|
65
|
+
const r = `(${e})`, n = M[e];
|
|
66
|
+
t = t.split(r).join(n);
|
|
67
|
+
}), t = t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/^# (.+)$/gm, '<div class="md-h1">$1</div>').replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\n/g, "<br>"), t) : "<div class='empty'>暂无模板内容,请先编辑上方模板</div>";
|
|
68
|
+
});
|
|
69
|
+
function x(t) {
|
|
70
|
+
const e = `{${t.fieldName}}`, r = s.templateContent || "", n = document.querySelector(
|
|
71
|
+
".template-content-textarea textarea"
|
|
72
|
+
);
|
|
73
|
+
if (!n) {
|
|
74
|
+
s.templateContent = r + e;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const c = n.selectionStart, v = n.selectionEnd;
|
|
78
|
+
s.templateContent = r.substring(0, c) + e + r.substring(v), re(() => {
|
|
79
|
+
n.selectionStart = n.selectionEnd = c + e.length, n.focus();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const Q = B({
|
|
83
|
+
templateType: [
|
|
84
|
+
{
|
|
85
|
+
required: !0,
|
|
86
|
+
message: u("promptTemplate.templateTypeRequired"),
|
|
87
|
+
trigger: "change"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
appId: [
|
|
91
|
+
{
|
|
92
|
+
required: !0,
|
|
93
|
+
message: u("promptTemplate.appIdRequired"),
|
|
94
|
+
trigger: "change"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
weightCode: [
|
|
98
|
+
{
|
|
99
|
+
required: !0,
|
|
100
|
+
message: u("promptTemplate.weightCodeRequired"),
|
|
101
|
+
trigger: "change"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
templateCode: [
|
|
105
|
+
{
|
|
106
|
+
required: !0,
|
|
107
|
+
message: u("promptTemplate.templateCodeRequired"),
|
|
108
|
+
trigger: "change"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
templateName: [
|
|
112
|
+
{
|
|
113
|
+
required: !0,
|
|
114
|
+
message: u("promptTemplate.likeTemplateNameRequired"),
|
|
115
|
+
trigger: "change"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
templateContent: [
|
|
119
|
+
{
|
|
120
|
+
required: !0,
|
|
121
|
+
message: u("promptTemplate.templateContentRequired"),
|
|
122
|
+
trigger: "change"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
templateSample: [
|
|
126
|
+
{
|
|
127
|
+
required: !0,
|
|
128
|
+
message: u("promptTemplate.templateSampleRequired"),
|
|
129
|
+
trigger: "change"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
priorityNo: [
|
|
133
|
+
{
|
|
134
|
+
required: !0,
|
|
135
|
+
message: u("promptTemplate.priorityNoRequired"),
|
|
136
|
+
trigger: "change"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
status: [
|
|
140
|
+
{
|
|
141
|
+
required: !0,
|
|
142
|
+
message: u("promptTemplate.statusRequired"),
|
|
143
|
+
trigger: "change"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}), _ = ae(F, "modelValue"), U = F, j = z, X = Object.keys(U.entityKey), $ = R(X.length >= 1);
|
|
147
|
+
$.value && D.findById(U.entityKey).then(({ data: t }) => {
|
|
148
|
+
Object.assign(s, t);
|
|
149
|
+
});
|
|
150
|
+
const Y = async () => {
|
|
151
|
+
var t;
|
|
152
|
+
await ((t = S.value) == null ? void 0 : t.validate((e) => {
|
|
153
|
+
e && ($.value ? D.update(s).then((r) => {
|
|
154
|
+
console.log(r), r.status === 200 && (H({
|
|
155
|
+
message: u("common.submitSuccess"),
|
|
156
|
+
type: "success"
|
|
157
|
+
}), _.value && (_.value = !1), j("refresh", r.status === 200));
|
|
158
|
+
}) : D.create(s).then((r) => {
|
|
159
|
+
console.log(r), r.status === 200 && (H({
|
|
160
|
+
message: u("common.submitSuccess"),
|
|
161
|
+
type: "success"
|
|
162
|
+
}), _.value && (_.value = !1), j("refresh", r.status === 200));
|
|
163
|
+
}));
|
|
164
|
+
}));
|
|
165
|
+
};
|
|
166
|
+
function A() {
|
|
167
|
+
_.value && (_.value = !1);
|
|
168
|
+
}
|
|
169
|
+
return (t, e) => {
|
|
170
|
+
const r = m("el-input"), n = m("el-form-item"), c = m("el-col"), v = m("jmash-dict-select"), b = m("el-input-number"), I = m("el-radio"), T = m("el-radio-group"), Z = m("el-row"), ee = m("el-icon"), L = m("el-tag"), te = m("el-form"), O = m("el-button"), le = m("el-dialog");
|
|
171
|
+
return d(), P(le, {
|
|
172
|
+
modelValue: _.value,
|
|
173
|
+
"onUpdate:modelValue": e[6] || (e[6] = (w) => _.value = w),
|
|
174
|
+
onClose: A,
|
|
175
|
+
width: "900px"
|
|
176
|
+
}, {
|
|
177
|
+
footer: i(() => [
|
|
178
|
+
o("div", Ee, [
|
|
179
|
+
a(O, { onClick: A }, {
|
|
180
|
+
default: i(() => [
|
|
181
|
+
y(g(t.$t("common.cancel")), 1)
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}),
|
|
185
|
+
a(O, {
|
|
186
|
+
type: "primary",
|
|
187
|
+
onClick: Y
|
|
188
|
+
}, {
|
|
189
|
+
default: i(() => [
|
|
190
|
+
y(g(t.$t("common.confirm")), 1)
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
})
|
|
194
|
+
])
|
|
195
|
+
]),
|
|
196
|
+
default: i(() => [
|
|
197
|
+
a(te, {
|
|
198
|
+
ref_key: "promptTemplateFormRef",
|
|
199
|
+
ref: S,
|
|
200
|
+
model: p(s),
|
|
201
|
+
"label-width": "120px",
|
|
202
|
+
rules: Q
|
|
203
|
+
}, {
|
|
204
|
+
default: i(() => {
|
|
205
|
+
var w;
|
|
206
|
+
return [
|
|
207
|
+
o("div", ue, [
|
|
208
|
+
e[7] || (e[7] = o("div", { class: "section-title" }, "基础信息", -1)),
|
|
209
|
+
a(Z, { gutter: 20 }, {
|
|
210
|
+
default: i(() => [
|
|
211
|
+
a(c, { span: 12 }, {
|
|
212
|
+
default: i(() => [
|
|
213
|
+
a(n, {
|
|
214
|
+
label: t.$t("promptTemplate.templateName"),
|
|
215
|
+
prop: "templateName"
|
|
216
|
+
}, {
|
|
217
|
+
default: i(() => [
|
|
218
|
+
a(r, {
|
|
219
|
+
modelValue: p(s).templateName,
|
|
220
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => p(s).templateName = l),
|
|
221
|
+
placeholder: t.$t("promptTemplate.likeTemplateNameRequired"),
|
|
222
|
+
maxlength: "60",
|
|
223
|
+
"show-word-limit": "",
|
|
224
|
+
clearable: ""
|
|
225
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["label"])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
}),
|
|
232
|
+
a(c, { span: 12 }, {
|
|
233
|
+
default: i(() => [
|
|
234
|
+
a(n, {
|
|
235
|
+
label: t.$t("promptTemplate.templateCode"),
|
|
236
|
+
prop: "templateCode"
|
|
237
|
+
}, {
|
|
238
|
+
default: i(() => [
|
|
239
|
+
a(r, {
|
|
240
|
+
modelValue: p(s).templateCode,
|
|
241
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => p(s).templateCode = l),
|
|
242
|
+
placeholder: t.$t("promptTemplate.templateCodeRequired"),
|
|
243
|
+
maxlength: "15",
|
|
244
|
+
"show-word-limit": "",
|
|
245
|
+
clearable: ""
|
|
246
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["label"])
|
|
250
|
+
]),
|
|
251
|
+
_: 1
|
|
252
|
+
}),
|
|
253
|
+
a(c, { span: 12 }, {
|
|
254
|
+
default: i(() => [
|
|
255
|
+
a(n, {
|
|
256
|
+
label: t.$t("promptTemplate.weightCode"),
|
|
257
|
+
prop: "weightCode"
|
|
258
|
+
}, {
|
|
259
|
+
default: i(() => [
|
|
260
|
+
a(v, {
|
|
261
|
+
modelValue: p(s).weightCode,
|
|
262
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => p(s).weightCode = l),
|
|
263
|
+
"type-code": p(me).MODULE_WEIGHT_DICT,
|
|
264
|
+
placeholder: t.$t("promptTemplate.weightCodeRequired"),
|
|
265
|
+
class: "w-full"
|
|
266
|
+
}, null, 8, ["modelValue", "type-code", "placeholder"])
|
|
267
|
+
]),
|
|
268
|
+
_: 1
|
|
269
|
+
}, 8, ["label"])
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
}),
|
|
273
|
+
a(c, { span: 12 }, {
|
|
274
|
+
default: i(() => [
|
|
275
|
+
a(n, {
|
|
276
|
+
label: t.$t("promptTemplate.priorityNo"),
|
|
277
|
+
prop: "priorityNo"
|
|
278
|
+
}, {
|
|
279
|
+
default: i(() => [
|
|
280
|
+
a(b, {
|
|
281
|
+
modelValue: p(s).priorityNo,
|
|
282
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => p(s).priorityNo = l),
|
|
283
|
+
placeholder: t.$t("promptTemplate.priorityNoRequired"),
|
|
284
|
+
min: 0,
|
|
285
|
+
max: 99999,
|
|
286
|
+
precision: 0,
|
|
287
|
+
"controls-position": "right",
|
|
288
|
+
class: "w-full"
|
|
289
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
290
|
+
]),
|
|
291
|
+
_: 1
|
|
292
|
+
}, 8, ["label"])
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
}),
|
|
296
|
+
a(c, { span: 12 }, {
|
|
297
|
+
default: i(() => [
|
|
298
|
+
a(n, {
|
|
299
|
+
label: t.$t("promptTemplate.status"),
|
|
300
|
+
prop: "status"
|
|
301
|
+
}, {
|
|
302
|
+
default: i(() => [
|
|
303
|
+
a(T, {
|
|
304
|
+
modelValue: p(s).status,
|
|
305
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => p(s).status = l)
|
|
306
|
+
}, {
|
|
307
|
+
default: i(() => [
|
|
308
|
+
(d(!0), f(h, null, C(p(k).statusEnum.values, (l) => (d(), P(I, {
|
|
309
|
+
key: l.key,
|
|
310
|
+
value: l.key,
|
|
311
|
+
disabled: $.value
|
|
312
|
+
}, {
|
|
313
|
+
default: i(() => [
|
|
314
|
+
y(g(l.value), 1)
|
|
315
|
+
]),
|
|
316
|
+
_: 2
|
|
317
|
+
}, 1032, ["value", "disabled"]))), 128))
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
}, 8, ["modelValue"])
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
}, 8, ["label"])
|
|
324
|
+
]),
|
|
325
|
+
_: 1
|
|
326
|
+
})
|
|
327
|
+
]),
|
|
328
|
+
_: 1
|
|
329
|
+
})
|
|
330
|
+
]),
|
|
331
|
+
o("div", ce, [
|
|
332
|
+
e[10] || (e[10] = o("div", { class: "section-title" }, "模板内容", -1)),
|
|
333
|
+
o("div", fe, [
|
|
334
|
+
(d(!0), f(h, null, C(G.value, (l) => (d(), f("div", {
|
|
335
|
+
class: "palette-row",
|
|
336
|
+
key: l.dictCode
|
|
337
|
+
}, [
|
|
338
|
+
o("span", ge, g(l.dictName), 1),
|
|
339
|
+
o("div", _e, [
|
|
340
|
+
(d(!0), f(h, null, C(l.fields, (N) => (d(), f("span", {
|
|
341
|
+
class: "field-pill",
|
|
342
|
+
key: N.fieldName,
|
|
343
|
+
onClick: (xe) => x(N)
|
|
344
|
+
}, g(N.fieldRemark), 9, ve))), 128))
|
|
345
|
+
])
|
|
346
|
+
]))), 128))
|
|
347
|
+
]),
|
|
348
|
+
o("div", he, [
|
|
349
|
+
o("div", Ce, [
|
|
350
|
+
e[8] || (e[8] = o("span", { class: "palette-label" }, "公共信息", -1)),
|
|
351
|
+
o("div", ye, [
|
|
352
|
+
(d(!0), f(h, null, C(W.value, (l) => (d(), f("span", {
|
|
353
|
+
class: "field-pill",
|
|
354
|
+
key: l.fieldName,
|
|
355
|
+
onClick: (N) => x(l)
|
|
356
|
+
}, g(l.fieldRemark), 9, be))), 128))
|
|
357
|
+
])
|
|
358
|
+
])
|
|
359
|
+
]),
|
|
360
|
+
o("div", Te, [
|
|
361
|
+
a(r, {
|
|
362
|
+
modelValue: p(s).templateContent,
|
|
363
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => p(s).templateContent = l),
|
|
364
|
+
type: "textarea",
|
|
365
|
+
rows: 8,
|
|
366
|
+
placeholder: t.$t("promptTemplate.templateContent"),
|
|
367
|
+
maxlength: "32767",
|
|
368
|
+
"show-word-limit": "",
|
|
369
|
+
class: "template-content-textarea"
|
|
370
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
371
|
+
o("div", we, [
|
|
372
|
+
o("span", Ne, "字符数 " + g(((w = p(s).templateContent) == null ? void 0 : w.length) || 0), 1),
|
|
373
|
+
q.value.length ? (d(), f("div", Ve, [
|
|
374
|
+
e[9] || (e[9] = o("span", { class: "referenced-label" }, "引用占位符", -1)),
|
|
375
|
+
(d(!0), f(h, null, C(q.value, (l) => (d(), f("span", {
|
|
376
|
+
class: "referenced-pill",
|
|
377
|
+
key: l
|
|
378
|
+
}, g(l), 1))), 128))
|
|
379
|
+
])) : se("", !0)
|
|
380
|
+
])
|
|
381
|
+
])
|
|
382
|
+
]),
|
|
383
|
+
o("div", ke, [
|
|
384
|
+
e[14] || (e[14] = o("div", { class: "section-title" }, "提示词样例", -1)),
|
|
385
|
+
o("div", qe, [
|
|
386
|
+
o("div", $e, [
|
|
387
|
+
o("div", Re, [
|
|
388
|
+
a(ee, null, {
|
|
389
|
+
default: i(() => [
|
|
390
|
+
a(p(ne))
|
|
391
|
+
]),
|
|
392
|
+
_: 1
|
|
393
|
+
}),
|
|
394
|
+
e[12] || (e[12] = o("span", { class: "sample-filename" }, "prompt_sample.md", -1)),
|
|
395
|
+
a(L, {
|
|
396
|
+
size: "small",
|
|
397
|
+
type: "info"
|
|
398
|
+
}, {
|
|
399
|
+
default: i(() => [...e[11] || (e[11] = [
|
|
400
|
+
y("只读预览", -1)
|
|
401
|
+
])]),
|
|
402
|
+
_: 1
|
|
403
|
+
})
|
|
404
|
+
]),
|
|
405
|
+
o("div", De, [
|
|
406
|
+
a(L, {
|
|
407
|
+
size: "small",
|
|
408
|
+
type: "success"
|
|
409
|
+
}, {
|
|
410
|
+
default: i(() => [...e[13] || (e[13] = [
|
|
411
|
+
y("变量已渲染", -1)
|
|
412
|
+
])]),
|
|
413
|
+
_: 1
|
|
414
|
+
}),
|
|
415
|
+
o("span", Fe, g(q.value.length) + " 条指令", 1)
|
|
416
|
+
])
|
|
417
|
+
]),
|
|
418
|
+
o("div", {
|
|
419
|
+
class: "sample-body",
|
|
420
|
+
innerHTML: J.value
|
|
421
|
+
}, null, 8, Se)
|
|
422
|
+
])
|
|
423
|
+
])
|
|
424
|
+
];
|
|
425
|
+
}),
|
|
426
|
+
_: 1
|
|
427
|
+
}, 8, ["model", "rules"])
|
|
428
|
+
]),
|
|
429
|
+
_: 1
|
|
430
|
+
}, 8, ["modelValue"]);
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
}), He = /* @__PURE__ */ de(Me, [["__scopeId", "data-v-ce562b80"]]);
|
|
434
|
+
export {
|
|
435
|
+
He as default
|
|
436
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as x, ref as i, onMounted as y, onUnmounted as w, openBlock as b, createElementBlock as C, createElementVNode as c, createTextVNode as L, toDisplayString as R } from "vue";
|
|
2
|
+
import { i as z } from "./index-DmqVT2Yh.mjs";
|
|
3
|
+
import { u as D } from "./index-CeyTmMNJ.mjs";
|
|
4
|
+
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const k = { class: "chart-card" }, A = { class: "card-header" }, S = { class: "header-tip" }, B = /* @__PURE__ */ x({
|
|
6
|
+
__name: "image",
|
|
7
|
+
setup(M) {
|
|
8
|
+
const a = i();
|
|
9
|
+
let e = null;
|
|
10
|
+
const l = i(0), d = i([]), f = ["0-30%", "31-60%", "61-80%", "81-100%"], m = {
|
|
11
|
+
"0-30%": "#E64340",
|
|
12
|
+
"31-60%": "#F5A623",
|
|
13
|
+
"61-80%": "#4285F4",
|
|
14
|
+
"81-100%": "#34B749"
|
|
15
|
+
}, _ = () => {
|
|
16
|
+
a.value && (e = z(a.value), u());
|
|
17
|
+
}, u = () => {
|
|
18
|
+
if (!e) return;
|
|
19
|
+
const o = [], t = [];
|
|
20
|
+
d.value.forEach((s) => {
|
|
21
|
+
o.push(s.scoreRange), t.push({
|
|
22
|
+
value: s.scoreCount,
|
|
23
|
+
itemStyle: { color: m[s.scoreRange] || "#999" },
|
|
24
|
+
label: {
|
|
25
|
+
show: !0,
|
|
26
|
+
position: "top",
|
|
27
|
+
color: "#333"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const r = {
|
|
32
|
+
tooltip: {
|
|
33
|
+
trigger: "axis",
|
|
34
|
+
axisPointer: { type: "shadow" }
|
|
35
|
+
},
|
|
36
|
+
grid: { left: "10%", right: "10%", bottom: "5%", containLabel: !1 },
|
|
37
|
+
xAxis: {
|
|
38
|
+
type: "category",
|
|
39
|
+
data: o,
|
|
40
|
+
axisLabel: { color: "#666" },
|
|
41
|
+
axisLine: { show: !1 },
|
|
42
|
+
axisTick: { show: !1 }
|
|
43
|
+
},
|
|
44
|
+
yAxis: {
|
|
45
|
+
type: "value",
|
|
46
|
+
show: !1,
|
|
47
|
+
min: 0
|
|
48
|
+
},
|
|
49
|
+
series: [
|
|
50
|
+
{
|
|
51
|
+
name: "数量",
|
|
52
|
+
type: "bar",
|
|
53
|
+
barWidth: 60,
|
|
54
|
+
data: t,
|
|
55
|
+
// 0值柱子强制显示最小高度
|
|
56
|
+
barMinHeight: 2,
|
|
57
|
+
label: {
|
|
58
|
+
show: !0,
|
|
59
|
+
position: "top",
|
|
60
|
+
color: "#333"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
e.setOption(r);
|
|
66
|
+
}, v = async () => {
|
|
67
|
+
try {
|
|
68
|
+
const t = (await D.countComplete()).data ?? {};
|
|
69
|
+
l.value = t.totalSize ?? 0;
|
|
70
|
+
const r = t.results ?? [], s = f.map((h) => {
|
|
71
|
+
const n = r.find((g) => g.scoreRange === h);
|
|
72
|
+
return {
|
|
73
|
+
scoreRange: h,
|
|
74
|
+
scoreCount: (n == null ? void 0 : n.scoreCount) ?? 0
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
d.value = s, u();
|
|
78
|
+
} catch (o) {
|
|
79
|
+
console.error("获取画像质量分布失败", o);
|
|
80
|
+
}
|
|
81
|
+
}, p = () => {
|
|
82
|
+
e == null || e.resize();
|
|
83
|
+
};
|
|
84
|
+
return y(() => {
|
|
85
|
+
_(), v(), window.addEventListener("resize", p);
|
|
86
|
+
}), w(() => {
|
|
87
|
+
window.removeEventListener("resize", p), e && (e.dispose(), e = null);
|
|
88
|
+
}), (o, t) => (b(), C("div", k, [
|
|
89
|
+
c("div", A, [
|
|
90
|
+
t[0] || (t[0] = L(" 画像质量分布 ", -1)),
|
|
91
|
+
c("span", S, "共" + R(l.value) + "条画像,按综合完整度划分为4个区间,点击柱体可跳转用户画像列表并自动筛选。", 1)
|
|
92
|
+
]),
|
|
93
|
+
c("div", {
|
|
94
|
+
class: "chart-content",
|
|
95
|
+
ref_key: "qualityChartRef",
|
|
96
|
+
ref: a
|
|
97
|
+
}, null, 512)
|
|
98
|
+
]));
|
|
99
|
+
}
|
|
100
|
+
}), T = /* @__PURE__ */ E(B, [["__scopeId", "data-v-27190f36"]]);
|
|
101
|
+
export {
|
|
102
|
+
T as default
|
|
103
|
+
};
|