@pubinfo-nightly/module-crypto 2025.12.8 → 2025.12.25
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/api/modules/crypto/pubSysConfigController.d.ts +4 -4
- package/dist/api/request.d.ts +1 -1
- package/dist/apiContext.d.ts +2 -2
- package/dist/context.d.ts +2 -2
- package/dist/cryptoAlg/aes.d.ts +1 -1
- package/dist/cryptoAlg/sm4-cbc.d.ts +1 -1
- package/dist/cryptoAlg/sm4-ecb.d.ts +1 -1
- package/dist/cryptoSetting.d.ts +2 -2
- package/dist/drawerCryptoUrl-CKgf1Uxz.js +106 -0
- package/dist/drawerCryptoUrl-DltbAlje.js +2 -0
- package/dist/helper.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7589 -8951
- package/dist/interface.d.ts +1 -1
- package/dist/setting-DkwAGQxz.js +216 -0
- package/dist/setting.css +1 -1
- package/package.json +4 -4
- package/src/cryptoSetting.ts +1 -1
- package/src/index.ts +0 -5
- package/dist/drawerCryptoUrl-pN2BPC_q.js +0 -4
- package/dist/drawerCryptoUrl.vue_vue_type_script_setup_true_lang-CztdWly1.js +0 -136
- package/dist/setting-2FfcqVsW.js +0 -267
package/dist/setting-2FfcqVsW.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { Form as G, FormItem as J, Switch as Q, CheckableTag as q, Space as H, Button as K } from "ant-design-vue/es";
|
|
2
|
-
import { useAuth as X, PubinfoIcon as Y } from "pubinfo-nightly";
|
|
3
|
-
import { QuestionCircleOutlined as Z, PlusCircleOutlined as ee } from "@ant-design/icons-vue";
|
|
4
|
-
import { defineComponent as te, ref as k, reactive as oe, onMounted as se, resolveDirective as ae, createElementBlock as E, openBlock as u, createElementVNode as d, createVNode as a, withCtx as l, unref as s, normalizeClass as V, createTextVNode as h, createBlock as P, createCommentVNode as re, withDirectives as D, toDisplayString as L } from "vue";
|
|
5
|
-
import { ProTable as ne } from "@pubinfo/pro-components";
|
|
6
|
-
import { message as ie, Modal as le } from "ant-design-vue";
|
|
7
|
-
import { g as ce, p as de, c as B } from "./index.js";
|
|
8
|
-
import { u as pe, _ as fe } from "./drawerCryptoUrl.vue_vue_type_script_setup_true_lang-CztdWly1.js";
|
|
9
|
-
import './setting.css';var n = /* @__PURE__ */ ((r) => (r.ADD = "新增", r.EDIT = "编辑", r.REMOVE = "删除", r.ENABLE = "启用", r.DISABLE = "停用", r))(n || {});
|
|
10
|
-
const ue = {
|
|
11
|
-
"w-full": "",
|
|
12
|
-
"h-full": "",
|
|
13
|
-
"pt-10px": "",
|
|
14
|
-
"px-10px": "",
|
|
15
|
-
"overflow-auto": ""
|
|
16
|
-
}, me = {
|
|
17
|
-
"h-full": "",
|
|
18
|
-
"min-w-1130px": ""
|
|
19
|
-
}, _e = { class: "pt-20px pl-20px h-161px flex flex-col bg-[#ffffff] box-border bg-[url('@/assets/images/crypto-setting-bg.png')] bg-cover text-[#4e5969] dark:text-[#C9CDD4]" }, he = { class: "flex items-center" }, ye = { class: "p-5px bg-[#f2f3f5] rounded-5px flex items-center" }, xe = { class: "flex items-center ml-15px text-[#a3a4a8]" }, be = { class: "h-[calc(100%-165px)]" }, Ce = ["onClick"], ge = { class: "ml-4px" }, ve = ["onClick"], we = { class: "ml-4px" }, ke = /* @__PURE__ */ te({
|
|
20
|
-
__name: "setting",
|
|
21
|
-
setup(r) {
|
|
22
|
-
const y = k(), p = k(), f = k(), x = { style: { width: "auto" } }, O = { span: 24 }, { auth: T } = X(), o = oe({
|
|
23
|
-
isCrypto: !0,
|
|
24
|
-
mode: !0,
|
|
25
|
-
whiteListUrls: []
|
|
26
|
-
}), [i, b] = pe(!1);
|
|
27
|
-
se(I);
|
|
28
|
-
async function I() {
|
|
29
|
-
await ce().then((t) => {
|
|
30
|
-
b(!1), t && t.data && t.success && (o.isCrypto = t.data.cryptoEnabled || !1, o.whiteListUrls = t.data.cryptoWhitePath, o.mode = t.data.cryptoMode === void 0 ? !0 : t.data.cryptoMode);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function R(t, e) {
|
|
34
|
-
e && (o.mode = t, C());
|
|
35
|
-
}
|
|
36
|
-
async function C() {
|
|
37
|
-
if (!i.value) {
|
|
38
|
-
b(!0);
|
|
39
|
-
try {
|
|
40
|
-
await p.value?.validate();
|
|
41
|
-
const {
|
|
42
|
-
isCrypto: t,
|
|
43
|
-
mode: e,
|
|
44
|
-
whiteListUrls: v
|
|
45
|
-
} = o, m = {
|
|
46
|
-
cryptoEnabled: t,
|
|
47
|
-
cryptoMode: e,
|
|
48
|
-
cryptoWhitePath: v
|
|
49
|
-
}, { success: _ } = await de({ json: JSON.stringify(m) });
|
|
50
|
-
_ && (ie.success("配置更改成功"), B.callAsync({ ...B.use(), isCrypto: o.isCrypto, cryptoMode: o.mode, whiteListUrls: o.whiteListUrls }, () => {
|
|
51
|
-
I();
|
|
52
|
-
}));
|
|
53
|
-
} catch {
|
|
54
|
-
b(!1);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const A = [
|
|
59
|
-
{
|
|
60
|
-
minWidth: 60,
|
|
61
|
-
hideInTable: !1,
|
|
62
|
-
title: "url地址",
|
|
63
|
-
dataIndex: "url"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
hideInSearch: !0,
|
|
67
|
-
minWidth: 200,
|
|
68
|
-
title: "描述",
|
|
69
|
-
dataIndex: "description",
|
|
70
|
-
ellipsis: !0
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
hideInSearch: !0,
|
|
74
|
-
title: "操作",
|
|
75
|
-
dataIndex: "action",
|
|
76
|
-
width: 200,
|
|
77
|
-
fixed: "right",
|
|
78
|
-
hideInTable() {
|
|
79
|
-
return !T([
|
|
80
|
-
"crypto_url_add",
|
|
81
|
-
"crypto_url_edit",
|
|
82
|
-
"crypto_url_delete"
|
|
83
|
-
]);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
|
-
function g(t, e) {
|
|
88
|
-
if (!i.value)
|
|
89
|
-
switch (t) {
|
|
90
|
-
case n.ADD:
|
|
91
|
-
f.value.open(!1, o.whiteListUrls);
|
|
92
|
-
break;
|
|
93
|
-
case n.EDIT:
|
|
94
|
-
f.value.open(!0, o.whiteListUrls, e);
|
|
95
|
-
break;
|
|
96
|
-
case n.REMOVE:
|
|
97
|
-
W(o.whiteListUrls || [], e || 0);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function W(t, e) {
|
|
102
|
-
le.confirm({
|
|
103
|
-
title: "删除",
|
|
104
|
-
content: "确定要删除该条数据吗?",
|
|
105
|
-
async onOk() {
|
|
106
|
-
t.splice(e, 1), U(t);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function U(t) {
|
|
111
|
-
o.whiteListUrls = t, C();
|
|
112
|
-
}
|
|
113
|
-
return (t, e) => {
|
|
114
|
-
const v = Q, m = J, _ = q, $ = G, F = ee, N = K, M = Y, j = H, w = ae("auth");
|
|
115
|
-
return u(), E("div", ue, [
|
|
116
|
-
d("div", me, [
|
|
117
|
-
d("div", _e, [
|
|
118
|
-
a($, {
|
|
119
|
-
ref_key: "formRef",
|
|
120
|
-
ref: p,
|
|
121
|
-
model: o,
|
|
122
|
-
"label-col": x,
|
|
123
|
-
"wrapper-col": O,
|
|
124
|
-
class: "safe-rule-form"
|
|
125
|
-
}, {
|
|
126
|
-
default: l(() => [
|
|
127
|
-
a(m, {
|
|
128
|
-
label: "开启加密",
|
|
129
|
-
name: "isCrypto"
|
|
130
|
-
}, {
|
|
131
|
-
default: l(() => [
|
|
132
|
-
a(v, {
|
|
133
|
-
checked: o.isCrypto,
|
|
134
|
-
"onUpdate:checked": e[0] || (e[0] = (c) => o.isCrypto = c),
|
|
135
|
-
disabled: s(i),
|
|
136
|
-
onChange: C
|
|
137
|
-
}, null, 8, ["checked", "disabled"])
|
|
138
|
-
]),
|
|
139
|
-
_: 1
|
|
140
|
-
}),
|
|
141
|
-
a(m, {
|
|
142
|
-
label: "模式",
|
|
143
|
-
name: "isCrypto"
|
|
144
|
-
}, {
|
|
145
|
-
default: l(() => [
|
|
146
|
-
d("div", he, [
|
|
147
|
-
d("div", ye, [
|
|
148
|
-
a(_, {
|
|
149
|
-
checked: o.mode,
|
|
150
|
-
disabled: s(i),
|
|
151
|
-
class: V(s(i) ? "cursor-not-allowed!" : ""),
|
|
152
|
-
onChange: e[1] || (e[1] = (c) => !s(i) && R(!0, c))
|
|
153
|
-
}, {
|
|
154
|
-
default: l(() => e[4] || (e[4] = [
|
|
155
|
-
h(" 白名单 ")
|
|
156
|
-
])),
|
|
157
|
-
_: 1,
|
|
158
|
-
__: [4]
|
|
159
|
-
}, 8, ["checked", "disabled", "class"]),
|
|
160
|
-
a(_, {
|
|
161
|
-
checked: !o.mode,
|
|
162
|
-
class: V(["mr-0px!", s(i) ? "cursor-not-allowed!" : ""]),
|
|
163
|
-
onChange: e[2] || (e[2] = (c) => !s(i) && R(!1, c))
|
|
164
|
-
}, {
|
|
165
|
-
default: l(() => e[5] || (e[5] = [
|
|
166
|
-
h(" 黑名单 ")
|
|
167
|
-
])),
|
|
168
|
-
_: 1,
|
|
169
|
-
__: [5]
|
|
170
|
-
}, 8, ["checked", "class"])
|
|
171
|
-
]),
|
|
172
|
-
d("div", xe, [
|
|
173
|
-
a(s(Z), { class: "mr-5px" }),
|
|
174
|
-
e[6] || (e[6] = h("白名单模式下,仅不加密过滤列表中的接口;黑名单模式下,仅加密过滤列表中的接口。 "))
|
|
175
|
-
])
|
|
176
|
-
])
|
|
177
|
-
]),
|
|
178
|
-
_: 1
|
|
179
|
-
})
|
|
180
|
-
]),
|
|
181
|
-
_: 1
|
|
182
|
-
}, 8, ["model"])
|
|
183
|
-
]),
|
|
184
|
-
d("div", be, [
|
|
185
|
-
a(s(ne), {
|
|
186
|
-
ref_key: "tableRef",
|
|
187
|
-
ref: y,
|
|
188
|
-
"row-key": "id",
|
|
189
|
-
"data-source": o.whiteListUrls,
|
|
190
|
-
columns: A,
|
|
191
|
-
"auto-height": "",
|
|
192
|
-
search: !1,
|
|
193
|
-
pagination: !1,
|
|
194
|
-
scroll: { x: 1e3 }
|
|
195
|
-
}, {
|
|
196
|
-
toolbar: l(() => [
|
|
197
|
-
D((u(), P(N, {
|
|
198
|
-
type: "primary",
|
|
199
|
-
disabled: s(i),
|
|
200
|
-
onClick: e[3] || (e[3] = (c) => g(s(n).ADD))
|
|
201
|
-
}, {
|
|
202
|
-
default: l(() => [
|
|
203
|
-
a(F),
|
|
204
|
-
h(" " + L(s(n).ADD), 1)
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
}, 8, ["disabled"])), [
|
|
208
|
-
[w, "crypto_url_add"]
|
|
209
|
-
])
|
|
210
|
-
]),
|
|
211
|
-
bodyCell: l(({ column: c, index: S }) => [
|
|
212
|
-
c.dataIndex === "action" ? (u(), P(j, { key: 0 }, {
|
|
213
|
-
default: l(() => [
|
|
214
|
-
D((u(), E("a", {
|
|
215
|
-
class: "flex items-center hover:opacity-80",
|
|
216
|
-
onClick: (z) => g(s(n).EDIT, S)
|
|
217
|
-
}, [
|
|
218
|
-
a(M, {
|
|
219
|
-
name: "edit",
|
|
220
|
-
class: "text-base"
|
|
221
|
-
}),
|
|
222
|
-
d("span", ge, L(s(n).EDIT), 1)
|
|
223
|
-
], 8, Ce)), [
|
|
224
|
-
[w, "crypto_url_edit"]
|
|
225
|
-
]),
|
|
226
|
-
D((u(), E("span", {
|
|
227
|
-
flex: "",
|
|
228
|
-
"items-center": "",
|
|
229
|
-
"text-red-500": "",
|
|
230
|
-
"hover:cursor-pointer": "",
|
|
231
|
-
"hover:text-red-500": "",
|
|
232
|
-
"hover:opacity-80": "",
|
|
233
|
-
onClick: (z) => g(s(n).REMOVE, S)
|
|
234
|
-
}, [
|
|
235
|
-
a(M, {
|
|
236
|
-
name: "remove",
|
|
237
|
-
class: "text-base"
|
|
238
|
-
}),
|
|
239
|
-
d("span", we, L(s(n).REMOVE), 1)
|
|
240
|
-
], 8, ve)), [
|
|
241
|
-
[w, "crypto_url_delete"]
|
|
242
|
-
])
|
|
243
|
-
]),
|
|
244
|
-
_: 2
|
|
245
|
-
}, 1024)) : re("", !0)
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 8, ["data-source"])
|
|
249
|
-
])
|
|
250
|
-
]),
|
|
251
|
-
a(fe, {
|
|
252
|
-
ref_key: "drawerRef",
|
|
253
|
-
ref: f,
|
|
254
|
-
onSubmit: U
|
|
255
|
-
}, null, 512)
|
|
256
|
-
]);
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
}), Ee = (r, y) => {
|
|
260
|
-
const p = r.__vccOpts || r;
|
|
261
|
-
for (const [f, x] of y)
|
|
262
|
-
p[f] = x;
|
|
263
|
-
return p;
|
|
264
|
-
}, Pe = /* @__PURE__ */ Ee(ke, [["__scopeId", "data-v-89197708"]]);
|
|
265
|
-
export {
|
|
266
|
-
Pe as default
|
|
267
|
-
};
|