mirror of https://github.com/certd/certd
chore:
parent
6f84ebb323
commit
c79658afbb
|
@ -17,7 +17,7 @@
|
||||||
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
|
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip v-if="cnameRecord.status === 'valid'" title="重置校验状态,重新校验">
|
<a-tooltip v-if="cnameRecord.status === 'valid'" title="重置校验状态,重新校验">
|
||||||
<fs-icon class="ml-2 color-yellow text-md point" icon="solar:undo-left-square-bold" @click="resetStatus"></fs-icon>
|
<fs-icon class="ml-2 color-yellow text-md pointer" icon="solar:undo-left-square-bold" @click="resetStatus"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
|
|
|
@ -67,3 +67,13 @@ export async function DoVerify(id: number) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function ResetStatus(id: number) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/resetStatus",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useRouter } from "vue-router";
|
||||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { message } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
import CnameTip from "/@/components/plugins/cert/domains-verify-plan-editor/cname-tip.vue";
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -190,6 +190,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
cellRender({ value, row }) {
|
cellRender({ value, row }) {
|
||||||
|
async function resetStatus() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "重置状态",
|
||||||
|
content: "确定要重置校验状态吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.ResetStatus(row.id);
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div class={"flex flex-center"}>
|
<div class={"flex flex-center"}>
|
||||||
<fs-values-format modelValue={value} dict={dictRef}></fs-values-format>
|
<fs-values-format modelValue={value} dict={dictRef}></fs-values-format>
|
||||||
|
@ -198,6 +208,12 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
<fs-icon class={"ml-5 color-red"} icon="ion:warning-outline"></fs-icon>
|
<fs-icon class={"ml-5 color-red"} icon="ion:warning-outline"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{row.status === "valid" && (
|
||||||
|
<a-tooltip title={"重置校验状态,重新校验"}>
|
||||||
|
<fs-icon class={"ml-5 pointer "} icon="solar:undo-left-square-bold" onClick={resetStatus}></fs-icon>
|
||||||
|
</a-tooltip>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue