@pubinfo-nightly/module-rbac 2026.1.8 → 2026.1.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.
|
@@ -11,21 +11,13 @@ import './blackWhiteList.css';let ACTION = /* @__PURE__ */ function(e) {
|
|
|
11
11
|
return e.ADD = "新增", e.EDIT = "编辑", e.REMOVE = "删除", e.ENABLE = "启用", e.DISABLE = "停用", e;
|
|
12
12
|
}({});
|
|
13
13
|
var _hoisted_1 = {
|
|
14
|
-
"w-full": "",
|
|
15
|
-
"h-full": "",
|
|
16
|
-
"py-10px": "",
|
|
17
|
-
"px-10px": "",
|
|
18
|
-
flex: "",
|
|
19
|
-
"flex-col": "",
|
|
20
|
-
class: "page-black-white-list"
|
|
21
|
-
}, _hoisted_2 = {
|
|
22
14
|
key: 0,
|
|
23
15
|
class: "flex items-center"
|
|
24
|
-
},
|
|
16
|
+
}, _hoisted_2 = { class: "ml-4px" }, _hoisted_3 = ["onClick"], _hoisted_4 = { class: "ml-4px" }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "ml-4px" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "ml-4px" }, _hoisted_9 = ["onClick"], _hoisted_10 = { class: "ml-4px" }, blackWhiteList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
25
17
|
name: "BlackWhiteList",
|
|
26
18
|
__name: "index",
|
|
27
|
-
setup(
|
|
28
|
-
let F =
|
|
19
|
+
setup(D) {
|
|
20
|
+
let P = useRoute(), F = computed(() => P.path.includes("blacklist")), I = computed(() => F.value ? 0 : 1), L = computed(() => F.value ? "blacklist" : "whitelist"), R = computed(() => `${L.value}_add`), z = computed(() => `${L.value}_edit`), B = computed(() => `${L.value}_delete`), V = computed(() => `${L.value}_enable`), H = computed(() => `${L.value}_disable`), { auth: U } = useAuth(), W = ref(), G = ref(), K = [
|
|
29
21
|
{
|
|
30
22
|
valueType: "a-input",
|
|
31
23
|
minWidth: 60,
|
|
@@ -80,31 +72,31 @@ var _hoisted_1 = {
|
|
|
80
72
|
}
|
|
81
73
|
];
|
|
82
74
|
async function q(e) {
|
|
83
|
-
let { current:
|
|
84
|
-
ip:
|
|
85
|
-
pageSize:
|
|
86
|
-
currentPage:
|
|
75
|
+
let { current: E, pageSize: D, ip: O, enable: A } = e, j = {
|
|
76
|
+
ip: O,
|
|
77
|
+
pageSize: D,
|
|
78
|
+
currentPage: E,
|
|
87
79
|
doSearchTotal: !0,
|
|
88
80
|
type: I.value
|
|
89
81
|
};
|
|
90
|
-
|
|
91
|
-
let
|
|
82
|
+
A !== void 0 && (j.enable = A);
|
|
83
|
+
let M = await postBlackWhiteListGetBlackWhiteListPageList(j);
|
|
92
84
|
return {
|
|
93
|
-
success:
|
|
94
|
-
data:
|
|
95
|
-
total:
|
|
85
|
+
success: M.success,
|
|
86
|
+
data: M.data?.records ?? [],
|
|
87
|
+
total: M.data?.total ?? 0
|
|
96
88
|
};
|
|
97
89
|
}
|
|
98
90
|
function J() {
|
|
99
91
|
W.value.reload();
|
|
100
92
|
}
|
|
101
93
|
let [Y, X] = useToggle(!1);
|
|
102
|
-
function Z(e,
|
|
94
|
+
function Z(e, D) {
|
|
103
95
|
Modal.confirm({
|
|
104
96
|
title: "删除",
|
|
105
97
|
content: `确定要删除该条${e}数据吗?`,
|
|
106
98
|
async onOk() {
|
|
107
|
-
X(!0), getBlackWhiteListDeleteById({ id:
|
|
99
|
+
X(!0), getBlackWhiteListDeleteById({ id: D?.id }).then((e) => {
|
|
108
100
|
e.success && (message.success("删除成功"), J());
|
|
109
101
|
}).finally(() => X(!1));
|
|
110
102
|
}
|
|
@@ -114,35 +106,44 @@ var _hoisted_1 = {
|
|
|
114
106
|
X(!0), postBlackWhiteListUpdateBlackWhiteList({
|
|
115
107
|
id: e?.id,
|
|
116
108
|
enable: !e?.enable
|
|
117
|
-
}).then((
|
|
118
|
-
if (
|
|
119
|
-
let
|
|
120
|
-
|
|
109
|
+
}).then((E) => {
|
|
110
|
+
if (E.success) {
|
|
111
|
+
let E = "";
|
|
112
|
+
E = e?.enable ? "停用成功!" : "启用成功!", message.success(E), J();
|
|
121
113
|
}
|
|
122
114
|
}).finally(() => X(!1));
|
|
123
115
|
}
|
|
124
|
-
function $(e,
|
|
116
|
+
function $(e, E) {
|
|
125
117
|
if (Y.value) return;
|
|
126
|
-
let
|
|
127
|
-
switch (
|
|
118
|
+
let D = "";
|
|
119
|
+
switch (D = F.value ? "黑名单" : "白名单", e) {
|
|
128
120
|
case ACTION.ADD:
|
|
129
|
-
G.value.open(e +
|
|
121
|
+
G.value.open(e + D, !1);
|
|
130
122
|
break;
|
|
131
123
|
case ACTION.EDIT:
|
|
132
|
-
G.value.open(e +
|
|
124
|
+
G.value.open(e + D, !0, E);
|
|
133
125
|
break;
|
|
134
126
|
case ACTION.REMOVE:
|
|
135
|
-
Z(
|
|
127
|
+
Z(D, E);
|
|
136
128
|
break;
|
|
137
129
|
case ACTION.ENABLE:
|
|
138
130
|
case ACTION.DISABLE:
|
|
139
|
-
Q(
|
|
131
|
+
Q(E);
|
|
140
132
|
break;
|
|
141
133
|
}
|
|
142
134
|
}
|
|
143
|
-
return (e,
|
|
144
|
-
let
|
|
145
|
-
return openBlock(), createElementBlock("div",
|
|
135
|
+
return (e, E) => {
|
|
136
|
+
let D = PlusCircleOutlined, O = Button, k = PubinfoIcon, M = Space$1, N = resolveDirective("auth");
|
|
137
|
+
return openBlock(), createElementBlock("div", {
|
|
138
|
+
key: unref(I),
|
|
139
|
+
"w-full": "",
|
|
140
|
+
"h-full": "",
|
|
141
|
+
"py-10px": "",
|
|
142
|
+
"px-10px": "",
|
|
143
|
+
flex: "",
|
|
144
|
+
"flex-col": "",
|
|
145
|
+
class: "page-black-white-list"
|
|
146
|
+
}, [createVNode(unref(ProTable), {
|
|
146
147
|
ref_key: "tableRef",
|
|
147
148
|
ref: W,
|
|
148
149
|
"row-key": "id",
|
|
@@ -151,22 +152,22 @@ var _hoisted_1 = {
|
|
|
151
152
|
"auto-height": "",
|
|
152
153
|
scroll: { x: 1e3 }
|
|
153
154
|
}, {
|
|
154
|
-
toolbar: withCtx(() => [withDirectives((openBlock(), createBlock(
|
|
155
|
+
toolbar: withCtx(() => [withDirectives((openBlock(), createBlock(O, {
|
|
155
156
|
type: "primary",
|
|
156
|
-
onClick:
|
|
157
|
+
onClick: E[0] ||= (e) => $(unref(ACTION).ADD)
|
|
157
158
|
}, {
|
|
158
|
-
default: withCtx(() => [createVNode(
|
|
159
|
+
default: withCtx(() => [createVNode(D), createTextVNode(" " + toDisplayString(unref(ACTION).ADD), 1)]),
|
|
159
160
|
_: 1
|
|
160
|
-
})), [[
|
|
161
|
-
bodyCell: withCtx(({ column: e, record:
|
|
161
|
+
})), [[N, unref(R)]])]),
|
|
162
|
+
bodyCell: withCtx(({ column: e, record: E }) => [e.dataIndex === "enable" ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("i", { class: normalizeClass(["status-mark", [{ active: E.enable }]]) }, null, 2), createElementVNode("span", _hoisted_2, toDisplayString(E.enable ? "启用" : "停用"), 1)])) : createCommentVNode("", !0), e.dataIndex === "action" ? (openBlock(), createBlock(M, { key: 1 }, {
|
|
162
163
|
default: withCtx(() => [
|
|
163
164
|
withDirectives((openBlock(), createElementBlock("a", {
|
|
164
165
|
class: "flex items-center hover:opacity-80",
|
|
165
|
-
onClick: (e) => $(unref(ACTION).EDIT,
|
|
166
|
-
}, [createVNode(
|
|
166
|
+
onClick: (e) => $(unref(ACTION).EDIT, E)
|
|
167
|
+
}, [createVNode(k, {
|
|
167
168
|
name: "edit",
|
|
168
169
|
class: "text-base"
|
|
169
|
-
}), createElementVNode("span",
|
|
170
|
+
}), createElementVNode("span", _hoisted_4, toDisplayString(unref(ACTION).EDIT), 1)], 8, _hoisted_3)), [[N, unref(z)]]),
|
|
170
171
|
withDirectives((openBlock(), createElementBlock("span", {
|
|
171
172
|
flex: "",
|
|
172
173
|
"items-center": "",
|
|
@@ -174,26 +175,26 @@ var _hoisted_1 = {
|
|
|
174
175
|
"hover:cursor-pointer": "",
|
|
175
176
|
"hover:text-red-500": "",
|
|
176
177
|
"hover:opacity-80": "",
|
|
177
|
-
onClick: (e) => $(unref(ACTION).REMOVE,
|
|
178
|
-
}, [createVNode(
|
|
178
|
+
onClick: (e) => $(unref(ACTION).REMOVE, E)
|
|
179
|
+
}, [createVNode(k, {
|
|
179
180
|
name: "remove",
|
|
180
181
|
class: "text-base"
|
|
181
|
-
}), createElementVNode("span",
|
|
182
|
-
|
|
182
|
+
}), createElementVNode("span", _hoisted_6, toDisplayString(unref(ACTION).REMOVE), 1)], 8, _hoisted_5)), [[N, unref(B)]]),
|
|
183
|
+
E.enable ? withDirectives((openBlock(), createElementBlock("a", {
|
|
183
184
|
key: 0,
|
|
184
185
|
class: "flex items-center",
|
|
185
|
-
onClick: (e) => $(unref(ACTION).DISABLE,
|
|
186
|
-
}, [createVNode(
|
|
186
|
+
onClick: (e) => $(unref(ACTION).DISABLE, E)
|
|
187
|
+
}, [createVNode(k, {
|
|
187
188
|
name: "blacklist-disable",
|
|
188
189
|
class: "text-20px"
|
|
189
|
-
}), createElementVNode("span",
|
|
190
|
+
}), createElementVNode("span", _hoisted_8, toDisplayString(unref(ACTION).DISABLE), 1)], 8, _hoisted_7)), [[N, unref(H)]]) : withDirectives((openBlock(), createElementBlock("a", {
|
|
190
191
|
key: 1,
|
|
191
192
|
class: "flex items-center",
|
|
192
|
-
onClick: (e) => $(unref(ACTION).ENABLE,
|
|
193
|
-
}, [createVNode(
|
|
193
|
+
onClick: (e) => $(unref(ACTION).ENABLE, E)
|
|
194
|
+
}, [createVNode(k, {
|
|
194
195
|
name: "blacklist-enable",
|
|
195
196
|
class: "text-20px"
|
|
196
|
-
}), createElementVNode("span",
|
|
197
|
+
}), createElementVNode("span", _hoisted_10, toDisplayString(unref(ACTION).ENABLE), 1)], 8, _hoisted_9)), [[N, unref(V)]])
|
|
197
198
|
]),
|
|
198
199
|
_: 2
|
|
199
200
|
}, 1024)) : createCommentVNode("", !0)]),
|
|
@@ -202,9 +203,9 @@ var _hoisted_1 = {
|
|
|
202
203
|
ref_key: "drawerRef",
|
|
203
204
|
ref: G,
|
|
204
205
|
type: unref(I),
|
|
205
|
-
onSubmit:
|
|
206
|
+
onSubmit: E[1] ||= (e) => J()
|
|
206
207
|
}, null, 8, ["type"])]);
|
|
207
208
|
};
|
|
208
209
|
}
|
|
209
|
-
}), [["__scopeId", "data-v-
|
|
210
|
+
}), [["__scopeId", "data-v-f7d838c2"]]);
|
|
210
211
|
export { blackWhiteList_default as default };
|
package/dist/blackWhiteList.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.page-black-white-list[data-v-
|
|
1
|
+
.page-black-white-list[data-v-f7d838c2] .ant-card.pro-table{border-top-left-radius:0;border-top-right-radius:0}.page-black-white-list .status-mark[data-v-f7d838c2]{--un-bg-opacity:1;background-color:rgb(174 174 174/var(--un-bg-opacity));border-radius:50%;width:.5rem;height:.5rem;margin-right:.25rem;display:inline-block}.page-black-white-list .status-mark.active[data-v-f7d838c2]{background:#01d689}
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ import './index.css';var _virtual_pubinfo_resolver_default = {
|
|
|
57
57
|
},
|
|
58
58
|
layouts: {},
|
|
59
59
|
pages: {
|
|
60
|
-
"src/views/blackWhiteList/index.vue": () => import("./blackWhiteList-
|
|
60
|
+
"src/views/blackWhiteList/index.vue": () => import("./blackWhiteList-CNQltBqC.js"),
|
|
61
61
|
"src/views/breadcrumb_setting/index.vue": () => import("./breadcrumb_setting-Ds-XJRR1.js"),
|
|
62
62
|
"src/views/components/HCheckList.vue": () => import("./HCheckList-B5Qk_HBI.js"),
|
|
63
63
|
"src/views/components/animation_item.vue": () => import("./animation_item-GzGItm3s.js"),
|
|
@@ -1681,7 +1681,7 @@ var _baseUniq_default = baseUniq, unionBy_default = _baseRest_default(function(t
|
|
|
1681
1681
|
children: [
|
|
1682
1682
|
{
|
|
1683
1683
|
path: "blacklist",
|
|
1684
|
-
component: () => import("./blackWhiteList-
|
|
1684
|
+
component: () => import("./blackWhiteList-CNQltBqC.js"),
|
|
1685
1685
|
name: "Blacklist",
|
|
1686
1686
|
meta: {
|
|
1687
1687
|
title: "黑名单管理",
|
|
@@ -1692,7 +1692,7 @@ var _baseUniq_default = baseUniq, unionBy_default = _baseRest_default(function(t
|
|
|
1692
1692
|
},
|
|
1693
1693
|
{
|
|
1694
1694
|
path: "whitelist",
|
|
1695
|
-
component: () => import("./blackWhiteList-
|
|
1695
|
+
component: () => import("./blackWhiteList-CNQltBqC.js"),
|
|
1696
1696
|
name: "Whitelist",
|
|
1697
1697
|
meta: {
|
|
1698
1698
|
title: "白名单管理",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo-nightly/module-rbac",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2026.01.
|
|
4
|
+
"version": "2026.01.10",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"alova": "^3.3.4",
|
|
26
26
|
"ant-design-vue": "^4.2.6",
|
|
27
27
|
"pinia": "^3.0.4",
|
|
28
|
-
"pubinfo-nightly": "2026.01.
|
|
28
|
+
"pubinfo-nightly": "2026.01.10"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@destyler/color-picker": "^0.1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"alova": "^3.3.4",
|
|
51
51
|
"ant-design-vue": "^4.2.6",
|
|
52
52
|
"pinia": "^3.0.4",
|
|
53
|
-
"pubinfo-nightly": "2026.01.
|
|
53
|
+
"pubinfo-nightly": "2026.01.10",
|
|
54
54
|
"type-fest": "^4.41.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
@@ -12,7 +12,7 @@ defineOptions({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const route = useRoute();
|
|
15
|
-
const isBlacklistMode =
|
|
15
|
+
const isBlacklistMode = computed(() => route.path.includes('blacklist'));
|
|
16
16
|
|
|
17
17
|
// 黑名单0,白名单1
|
|
18
18
|
const currentType = computed(() => {
|
|
@@ -196,6 +196,7 @@ function onAction(key: string, record?: API.PubBlackWhiteList): void {
|
|
|
196
196
|
|
|
197
197
|
<template>
|
|
198
198
|
<div
|
|
199
|
+
:key="currentType"
|
|
199
200
|
w-full
|
|
200
201
|
h-full
|
|
201
202
|
py-10px
|