mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: 优化站点ip检查
This commit is contained in:
@@ -56,6 +56,16 @@ export const siteInfoApi = {
|
||||
});
|
||||
},
|
||||
|
||||
async DisabledChange(id: number, disabled: boolean) {
|
||||
return await request({
|
||||
url: apiPrefix + "/disabledChange",
|
||||
method: "post",
|
||||
data: {
|
||||
id,
|
||||
disabled,
|
||||
},
|
||||
});
|
||||
},
|
||||
async IpCheckChange(id: number, ipCheck: boolean) {
|
||||
return await request({
|
||||
url: apiPrefix + "/ipCheckChange",
|
||||
|
||||
@@ -360,6 +360,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
width: 100,
|
||||
sorter: true,
|
||||
align: "center",
|
||||
component: {
|
||||
name: "fs-dict-switch",
|
||||
vModel: "checked",
|
||||
on: {
|
||||
async change({ row, $event }) {
|
||||
await api.DisabledChange(row.id, $event);
|
||||
await crudExpose.doRefresh();
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ipCheck: {
|
||||
@@ -367,8 +377,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
type: "dict-switch",
|
||||
dict: dict({
|
||||
data: [
|
||||
{ label: "启用", value: false, color: "green" },
|
||||
{ label: "禁用", value: true, color: "gray" },
|
||||
{ label: "启用", value: true, color: "green" },
|
||||
{ label: "禁用", value: false, color: "gray" },
|
||||
],
|
||||
}),
|
||||
form: {
|
||||
@@ -380,7 +390,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
width: 100,
|
||||
conditionalRender: false,
|
||||
component: {
|
||||
name: "a-switch",
|
||||
name: "fs-dict-switch",
|
||||
vModel: "checked",
|
||||
on: {
|
||||
change({ row, $event }) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { onActivated, onMounted, ref, Ref } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import { siteIpApi } from "./api";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
|
||||
defineOptions({
|
||||
name: "SiteIpCertMonitor",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user