import req from "@/request.js";

const portal = window.context.portal;
export default {
    // 新增
    addSave(data,cb) {
        req.post(portal + `/biz/managerOrg/person/create`,data).then(rep => {
            cb(rep.data);
        });
    },
    //字典
    getSys(data,cb) {
        req.post(portal + `/sys/sysDictionary/v1/queryDictItemsByCode`,data).then(rep => {
            cb(rep.data);
        });
    },
    //查看常用语详情
    detail(id,cb) {
        req.get(portal + `/biz/manager/org/get?id=`+id).then(rep => {
            cb(rep.data);
        });
    },
    // 分页
    ListGet(data,cb) {
        req.post(portal + `/biz/managerOrg/person/query`,data).then(rep => {
            cb(rep.data);
        });
    },
    // 修改
    detailId(id,cb) {
        req.get(portal + `/biz/managerOrg/person/get/`+id).then(rep => {
            cb(rep.data);
        });
    },
    // 确认修改
    upData(data,cb) {
        req.post(portal + `/biz/managerOrg/person/updateById`,data).then(rep => {
            cb(rep.data);
        });
    },
    //删除
    remove(ids,cb) {
        req.get(portal + `/biz/managerOrg/person/deleteByIds?ids=`+ids).then(rep => {
            cb(rep.data);
        });
    },
    // 行政区查询接口
    getbasAdName(data,cb) {
        req.post(portal + `/sys/sysAreas/v1/tree`,data).then(rep => {
            cb(rep.data);
        });
    },
    // 组织树接口
    getPerson(data,cb) {
        req.post(portal + `/biz/manager/org/getTree`,data).then(rep => {
            cb(rep.data);
        });
    },
    // mark(ids,cb) {
    //     req.get(portal + `/innermsg/messageReceiver/v1/mark?ids=`+ids).then(rep => {
    //         cb(rep.data);
    //     });
    // }
}