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


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

