sooyie-pgss 0.0.0-stage → 0.0.1
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/README.md +51 -3
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/apiCall-DGnOSgOg.mjs +223 -0
- package/dist/app-info-B4CG9SYQ.mjs +4 -0
- package/dist/app-info.vue_vue_type_script_setup_true_lang-OxZnXojA.mjs +444 -0
- package/dist/constant-D4fRv058.mjs +31 -0
- package/dist/edit-CR3tiHFR.mjs +418 -0
- package/dist/edit-Do1a4xeJ.mjs +340 -0
- package/dist/edit-sq0ohOci.mjs +439 -0
- package/dist/image-CROZrkNB.mjs +103 -0
- package/dist/index-AzecE6QF.mjs +306 -0
- package/dist/index-BEtcyjc1.mjs +513 -0
- package/dist/index-BUiu8rPV.mjs +1918 -0
- package/dist/index-BapHEpjV.mjs +1680 -0
- package/dist/index-CM5e4jX-.mjs +107 -0
- package/dist/index-C_8_sh8W.mjs +326 -0
- package/dist/index-CeyTmMNJ.mjs +109 -0
- package/dist/index-CkVsz6yH.mjs +145 -0
- package/dist/index-CoC7n2M9.mjs +58 -0
- package/dist/index-DAKAeNie.mjs +83 -0
- package/dist/index-DXoSy9iA.mjs +306 -0
- package/dist/index-DmqVT2Yh.mjs +43857 -0
- package/dist/index-MA9jC8ZF.mjs +109 -0
- package/dist/index.mjs +3037 -0
- package/dist/info-Bba_NzcG.mjs +184 -0
- package/dist/info-CunGvr-S.mjs +222 -0
- package/dist/resetPwd-CeTAHbCm.mjs +4 -0
- package/dist/resetPwd.vue_vue_type_script_setup_true_lang-Dx51Xvte.mjs +142 -0
- package/dist/simulateNum-DcFDMOSh.mjs +4 -0
- package/dist/simulateNum.vue_vue_type_script_setup_true_lang-ALzj6Sj-.mjs +102 -0
- package/dist/style.css +1 -0
- package/dts/src/App.vue.d.ts +2 -0
- package/dts/src/api/pgss/dict.d.ts +4 -0
- package/dts/src/api/pgss/index.d.ts +23 -0
- package/dts/src/api/pgss/pgss-app-info/index.d.ts +18 -0
- package/dts/src/api/pgss/pgss-app-info/types.d.ts +96 -0
- package/dts/src/api/pgss/pgss-app-stat/index.d.ts +20 -0
- package/dts/src/api/pgss/pgss-message-log/index.d.ts +14 -0
- package/dts/src/api/pgss/pgss-message-log/types.d.ts +80 -0
- package/dts/src/api/pgss/pgss-portrait-weight/index.d.ts +19 -0
- package/dts/src/api/pgss/pgss-portrait-weight/types.d.ts +72 -0
- package/dts/src/api/pgss/pgss-prompt-template/index.d.ts +15 -0
- package/dts/src/api/pgss/pgss-prompt-template/types.d.ts +77 -0
- package/dts/src/api/pgss/pgss-user-portrait/index.d.ts +18 -0
- package/dts/src/api/pgss/pgss-user-portrait/types.d.ts +143 -0
- package/dts/src/components/DateRangePicker/DateRangePicker.vue.d.ts +18 -0
- package/dts/src/constant.d.ts +29 -0
- package/dts/src/index.d.ts +5 -0
- package/dts/src/lang/index.d.ts +1 -0
- package/dts/src/lang/pgss/en.d.ts +88 -0
- package/dts/src/lang/pgss/zh-cn.d.ts +137 -0
- package/dts/src/main.d.ts +4 -0
- package/dts/src/permission.d.ts +1 -0
- package/dts/src/router/index.d.ts +9 -0
- package/dts/src/utils/copy.d.ts +1 -0
- package/dts/src/utils/dateFormat.d.ts +7 -0
- package/dts/src/utils/duration.d.ts +3 -0
- package/dts/src/utils/timePlugin.d.ts +5 -0
- package/dts/src/views/pgss/pgss-app-info/app-info.vue.d.ts +6 -0
- package/dts/src/views/pgss/pgss-app-info/edit.vue.d.ts +28 -0
- package/dts/src/views/pgss/pgss-app-info/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-app-info/info.vue.d.ts +26 -0
- package/dts/src/views/pgss/pgss-app-info/resetPwd.vue.d.ts +26 -0
- package/dts/src/views/pgss/pgss-homepage/apiCall.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-homepage/image.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-homepage/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-message-log/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-portrait-weight/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-prompt-template/edit.vue.d.ts +28 -0
- package/dts/src/views/pgss/pgss-prompt-template/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-prompt-template-custom/edit.vue.d.ts +28 -0
- package/dts/src/views/pgss/pgss-prompt-template-custom/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-user-portrait/index.vue.d.ts +2 -0
- package/dts/src/views/pgss/pgss-user-portrait/info.vue.d.ts +26 -0
- package/dts/src/views/pgss/pgss-user-portrait/simulateNum.vue.d.ts +11 -0
- package/package.json +57 -3
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# pnpm publish --no-git-checks
|
|
2
|
+
npm config set registry https://registry.npmjs.org/
|
|
3
|
+
|
|
4
|
+
# pnpm install
|
|
5
|
+
npm config set registry https://registry.npmmirror.com/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
9
|
+
|
|
10
|
+
## Recommended IDE Setup
|
|
11
|
+
|
|
12
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
13
|
+
|
|
14
|
+
## Type Support for `.vue` Imports in TS
|
|
15
|
+
|
|
16
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
17
|
+
|
|
18
|
+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
19
|
+
|
|
20
|
+
1. Disable the built-in TypeScript Extension
|
|
21
|
+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
22
|
+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
23
|
+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
24
|
+
|
|
25
|
+
## Customize configuration
|
|
26
|
+
|
|
27
|
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
28
|
+
|
|
29
|
+
## Project Setup
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
pnpm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Compile and Hot-Reload for Development
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pnpm dev
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Type-Check, Compile and Minify for Production
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
pnpm build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pnpm lint
|
|
51
|
+
```
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { defineComponent as w, ref as f, resolveComponent as A, openBlock as C, createElementBlock as T, createElementVNode as a, Fragment as Y, renderList as R, normalizeClass as V, toDisplayString as b, createVNode as L, computed as m, onMounted as E, onUnmounted as M } from "vue";
|
|
2
|
+
import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
import { i as N } from "./index-DmqVT2Yh.mjs";
|
|
4
|
+
import { a as z } from "./index-MA9jC8ZF.mjs";
|
|
5
|
+
const I = { class: "time-filter-bar" }, P = { class: "quick-options" }, F = ["onClick"], U = /* @__PURE__ */ w({
|
|
6
|
+
__name: "DateRangePicker",
|
|
7
|
+
props: {
|
|
8
|
+
// 默认选中的快捷选项
|
|
9
|
+
defaultType: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "today"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
emits: ["change"],
|
|
15
|
+
setup(S, { emit: _ }) {
|
|
16
|
+
const o = S, l = _, c = f(o.defaultType), u = f([]), g = [
|
|
17
|
+
{ label: "今天", value: "today" },
|
|
18
|
+
{ label: "近7天", value: "last7" },
|
|
19
|
+
{ label: "近30天", value: "last30" }
|
|
20
|
+
], h = (s) => {
|
|
21
|
+
const d = /* @__PURE__ */ new Date(), p = (n) => n.toString().padStart(2, "0"), r = (n) => {
|
|
22
|
+
const i = n.getFullYear(), D = n.getMonth() + 1, e = n.getDate();
|
|
23
|
+
return `${i}-${p(D)}-${p(e)}`;
|
|
24
|
+
};
|
|
25
|
+
switch (s) {
|
|
26
|
+
case "today": {
|
|
27
|
+
const n = r(d);
|
|
28
|
+
return [n, n];
|
|
29
|
+
}
|
|
30
|
+
case "last7": {
|
|
31
|
+
const n = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
32
|
+
return i.setDate(i.getDate() - 6), [r(i), r(n)];
|
|
33
|
+
}
|
|
34
|
+
case "last30": {
|
|
35
|
+
const n = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
|
|
36
|
+
return i.setDate(i.getDate() - 29), [r(i), r(n)];
|
|
37
|
+
}
|
|
38
|
+
default:
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
}, y = (s) => {
|
|
42
|
+
c.value = s;
|
|
43
|
+
const d = h(s);
|
|
44
|
+
u.value = d, l("change", d, s);
|
|
45
|
+
}, x = (s) => {
|
|
46
|
+
if (!s || s.length === 0) {
|
|
47
|
+
c.value = "", l("change", [], "");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
c.value = "custom", l("change", s, "custom");
|
|
51
|
+
};
|
|
52
|
+
{
|
|
53
|
+
const s = h(o.defaultType);
|
|
54
|
+
u.value = s;
|
|
55
|
+
}
|
|
56
|
+
return (s, d) => {
|
|
57
|
+
const p = A("el-date-picker");
|
|
58
|
+
return C(), T("div", I, [
|
|
59
|
+
a("div", P, [
|
|
60
|
+
(C(), T(Y, null, R(g, (r) => a("span", {
|
|
61
|
+
key: r.value,
|
|
62
|
+
class: V(["option-item", { active: c.value === r.value }]),
|
|
63
|
+
onClick: (n) => y(r.value)
|
|
64
|
+
}, b(r.label), 11, F)), 64))
|
|
65
|
+
]),
|
|
66
|
+
L(p, {
|
|
67
|
+
modelValue: u.value,
|
|
68
|
+
"onUpdate:modelValue": d[0] || (d[0] = (r) => u.value = r),
|
|
69
|
+
type: "daterange",
|
|
70
|
+
"start-placeholder": s.$t("liveVideo.startTime"),
|
|
71
|
+
"end-placeholder": s.$t("liveVideo.endTime"),
|
|
72
|
+
format: "YYYY-MM-DD",
|
|
73
|
+
"value-format": "YYYY-MM-DD",
|
|
74
|
+
onChange: x,
|
|
75
|
+
class: "date-picker",
|
|
76
|
+
clearable: ""
|
|
77
|
+
}, null, 8, ["modelValue", "start-placeholder", "end-placeholder"])
|
|
78
|
+
]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}), q = /* @__PURE__ */ $(U, [["__scopeId", "data-v-e20d4afb"]]), B = { class: "chart-card" }, O = { class: "card-top" }, W = { class: "card-filter" }, G = { class: "api-bottom-info" }, Q = { class: "info-item" }, Z = { class: "val" }, j = { class: "info-item" }, H = { class: "val success" }, J = { class: "info-item" }, K = { class: "val" }, X = /* @__PURE__ */ w({
|
|
82
|
+
__name: "apiCall",
|
|
83
|
+
setup(S) {
|
|
84
|
+
const _ = f();
|
|
85
|
+
let o = null;
|
|
86
|
+
const l = f([]), c = f(!0), u = f(!1), g = m(
|
|
87
|
+
() => l.value.map((e) => {
|
|
88
|
+
const t = e.statDate || "";
|
|
89
|
+
return t.length >= 10 ? t.slice(5, 10) : t;
|
|
90
|
+
})
|
|
91
|
+
), h = m(
|
|
92
|
+
() => l.value.map((e) => Number(e.successTimes ?? 0))
|
|
93
|
+
), y = m(
|
|
94
|
+
() => l.value.map((e) => Number(e.errorTimes ?? 0))
|
|
95
|
+
), x = m(() => {
|
|
96
|
+
var t;
|
|
97
|
+
if (c.value) return "--";
|
|
98
|
+
const e = l.value;
|
|
99
|
+
return !e.length || u.value ? "0" : (((t = e[e.length - 1]) == null ? void 0 : t.useTimes) ?? 0).toLocaleString();
|
|
100
|
+
}), s = m(() => {
|
|
101
|
+
if (c.value) return "--";
|
|
102
|
+
if (u.value || !l.value.length) return "0.00%";
|
|
103
|
+
const e = l.value.reduce(
|
|
104
|
+
(v, k) => v + Number(k.useTimes ?? 0),
|
|
105
|
+
0
|
|
106
|
+
), t = l.value.reduce(
|
|
107
|
+
(v, k) => v + Number(k.successTimes ?? 0),
|
|
108
|
+
0
|
|
109
|
+
);
|
|
110
|
+
return e ? (t / e * 100).toFixed(2) + "%" : "0.00%";
|
|
111
|
+
}), d = m(() => c.value ? "--" : "0ms");
|
|
112
|
+
function p() {
|
|
113
|
+
if (!_.value) return;
|
|
114
|
+
o = N(_.value);
|
|
115
|
+
const e = {
|
|
116
|
+
tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
|
|
117
|
+
legend: [{ data: ["成功调用量", "失败调用量"], left: 0 }],
|
|
118
|
+
grid: { left: "6%", right: "4%", bottom: "10%", containLabel: !0 },
|
|
119
|
+
xAxis: {
|
|
120
|
+
type: "category",
|
|
121
|
+
data: g.value,
|
|
122
|
+
axisLabel: { color: "#666" }
|
|
123
|
+
},
|
|
124
|
+
yAxis: {
|
|
125
|
+
type: "value",
|
|
126
|
+
name: "调用次数",
|
|
127
|
+
nameGap: 10,
|
|
128
|
+
splitLine: { lineStyle: { color: "#eee" } }
|
|
129
|
+
},
|
|
130
|
+
series: [
|
|
131
|
+
{
|
|
132
|
+
name: "成功调用量",
|
|
133
|
+
type: "bar",
|
|
134
|
+
stack: "total",
|
|
135
|
+
barWidth: "40%",
|
|
136
|
+
itemStyle: { color: "#74A9E8" },
|
|
137
|
+
data: h.value
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "失败调用量",
|
|
141
|
+
type: "bar",
|
|
142
|
+
stack: "total",
|
|
143
|
+
barWidth: "40%",
|
|
144
|
+
itemStyle: { color: "#E64340" },
|
|
145
|
+
data: y.value
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
o.setOption(e);
|
|
150
|
+
}
|
|
151
|
+
function r() {
|
|
152
|
+
o && (o.setOption({
|
|
153
|
+
xAxis: { data: g.value },
|
|
154
|
+
series: [{ data: h.value }, { data: y.value }]
|
|
155
|
+
}), o.dispatchAction({
|
|
156
|
+
type: "dataZoom",
|
|
157
|
+
startValue: Math.max(0, l.value.length - 7)
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
function n(e) {
|
|
161
|
+
c.value = !0, u.value = !1, z.countStatus(e ?? {}).then((t) => {
|
|
162
|
+
var v;
|
|
163
|
+
l.value = ((v = t.data) == null ? void 0 : v.results) || [], r();
|
|
164
|
+
}).catch((t) => {
|
|
165
|
+
console.error("[apiCall] countStatus 调用失败:", t), u.value = !0, l.value = [];
|
|
166
|
+
}).finally(() => {
|
|
167
|
+
c.value = !1;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function i(e, t) {
|
|
171
|
+
if (!e || e.length < 2) {
|
|
172
|
+
n();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
n({ startDate: e[0], endDate: e[1] });
|
|
176
|
+
}
|
|
177
|
+
function D() {
|
|
178
|
+
o == null || o.resize();
|
|
179
|
+
}
|
|
180
|
+
return E(() => {
|
|
181
|
+
p(), window.addEventListener("resize", D);
|
|
182
|
+
}), M(() => {
|
|
183
|
+
window.removeEventListener("resize", D), o && (o.dispose(), o = null);
|
|
184
|
+
}), (e, t) => {
|
|
185
|
+
const v = q;
|
|
186
|
+
return C(), T("div", B, [
|
|
187
|
+
a("div", O, [
|
|
188
|
+
t[0] || (t[0] = a("div", { class: "card-title-row" }, [
|
|
189
|
+
a("span", { class: "card-title" }, "API调用次数")
|
|
190
|
+
], -1)),
|
|
191
|
+
a("div", W, [
|
|
192
|
+
L(v, {
|
|
193
|
+
defaultType: "last7",
|
|
194
|
+
onChange: i
|
|
195
|
+
})
|
|
196
|
+
])
|
|
197
|
+
]),
|
|
198
|
+
a("div", {
|
|
199
|
+
class: "chart-content",
|
|
200
|
+
ref_key: "apiChartRef",
|
|
201
|
+
ref: _
|
|
202
|
+
}, null, 512),
|
|
203
|
+
a("div", G, [
|
|
204
|
+
a("div", Q, [
|
|
205
|
+
t[1] || (t[1] = a("div", { class: "label" }, "今日总调用", -1)),
|
|
206
|
+
a("div", Z, b(x.value) + " 次", 1)
|
|
207
|
+
]),
|
|
208
|
+
a("div", j, [
|
|
209
|
+
t[2] || (t[2] = a("div", { class: "label" }, "平均成功率", -1)),
|
|
210
|
+
a("div", H, b(s.value), 1)
|
|
211
|
+
]),
|
|
212
|
+
a("div", J, [
|
|
213
|
+
t[3] || (t[3] = a("div", { class: "label" }, "平均响应耗时", -1)),
|
|
214
|
+
a("div", K, b(d.value), 1)
|
|
215
|
+
])
|
|
216
|
+
])
|
|
217
|
+
]);
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}), ne = /* @__PURE__ */ $(X, [["__scopeId", "data-v-831a1ff6"]]);
|
|
221
|
+
export {
|
|
222
|
+
ne as default
|
|
223
|
+
};
|