import { action, makeObservable } from "mobx";
// 档案分类
import BaseStore from "./baseStore";
import { TagDataType } from "@/model/userModel";
import baseHttp from "@/service/base";


class LeaveConfig {
    static LIST: string = "/v1/leave/list"
    static ADD: string = "/v1/leave"
    static DELETE: string = "/v1/leave"
    static EDIT: string = "/v1/leave"
    static ACCESS: string = "/v1/leave/access"
}
class LeaveStore extends BaseStore<TagDataType> {
    constructor() {
        super(LeaveConfig)
        makeObservable(this, {
            access: action
        })
    }
    async access(id: number, param: any) {
        await baseHttp.put(LeaveConfig.ACCESS + "/" + id, param)
        this.getlist()
    }
}
export const leaveStore = new LeaveStore()

