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


class LeaveConfig {
    static LIST: string = "leave/list"
    static ADD: string = "leave"
    static DELETE: string = "leave"
    static EDIT: string = "leave"
    static ACCESS: string = "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()

