import request from "@/utils/httpRequest";
import { SYS_PATH as prefix } from "../AppPath";

export default {
	save: function (inputForm) {
		return request({
			url: prefix + "/sys/office/save",
			method: "post",
			data: inputForm,
		});
	},

	drag: function (inputForm) {
		return request({
			url: prefix + "/sys/office/drag",
			method: "post",
			data: inputForm,
		});
	},

	delete: function (ids) {
		return request({
			url: prefix + "/sys/office/delete",
			method: "delete",
			params: { ids: ids },
		});
	},

	queryById: function (id) {
		return request({
			url: prefix + "/sys/office/queryById",
			method: "get",
			params: { id: id },
		});
	},

	treeData: function (params) {
		return request({
			url: prefix + "/sys/office/treeData",
			method: "get",
			params: params,
		});
	},
	treeDataNew: function (params) {
		return request({
			url: prefix + "/sys/office/treeDataNew",
			method: "get",
			params: params,
		});
	},
	allTreeData: function (params) {
		return request({
			url: prefix + "/sys/office/allTreeData",
			method: "get",
			params: params,
		});
	},

	treeData2(params) {
		return request({
			url: prefix + "/sys/office/treeData2",
			method: "get",
			params: params,
		});
	},
	listTree(params) {
		return request({
			url: prefix + "/sys/office/list_tree",
			method: "get",
			params: params,
		});
	},
	getSecondLevelData() {
		return request({
			url: prefix + "/sys/office/getSecondLevelData",
			method: "get",
		});
	},
	getAllCompany() {
		return request({
			url: prefix + "/sys/office/get_all_company",
			method: "get",
		});
	},
	checkLoginIsPgOrKj() {
		return request({
			url: prefix + "/sys/office/checkLoginIsPgOrKj",
			method: "get",
		});
	},
};
