101 lines
3.9 KiB
TypeScript
101 lines
3.9 KiB
TypeScript
|
|
import { request } from "@/utils/request";
|
|
import type { SecurityLockEntityKey } from "@/data/auto/securityLockEntityKey";
|
|
import type { SecurityLockEntity } from "@/data/auto/securityLockEntity";
|
|
|
|
class SecurityLockService{
|
|
|
|
async FindByKey(data: SecurityLockEntityKey) {
|
|
return request<SecurityLockEntity>(
|
|
{
|
|
url: "/SecurityLock/FindByKey",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async Insert(data: SecurityLockEntity) {
|
|
return request<SecurityLockEntity>(
|
|
{
|
|
url: "/SecurityLock/Insert",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async Update(data: SecurityLockEntity) {
|
|
return request<SecurityLockEntity>(
|
|
{
|
|
url: "/SecurityLock/Update",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async Delete(data: SecurityLockEntityKey) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/Delete",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async IsLocked(data: any) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/IsLocked",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async Lock(data: any) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/Lock",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async ForceLock(data: any) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/ForceLock",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async ConsumeLock(data: any) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/ConsumeLock",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
async ClearLock(data: any) {
|
|
return request<any>(
|
|
{
|
|
url: "/SecurityLock/ClearLock",
|
|
method: "post",
|
|
data,
|
|
}
|
|
)
|
|
};
|
|
|
|
}
|
|
|
|
const securityLockService= new SecurityLockService();
|
|
export default securityLockService; |