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

export default {
	saveCertList(inputForm) {
		return request({
			url: prefix + `/sys/user/saveCertList`,
			method: "post",
			headers: { arrayFormat: "repeat" },
			data: inputForm,
		});
	},
	save: function (inputForm) {
		return request({
			url: prefix + "/sys/user/save",
			method: "post",
			headers: { arrayFormat: "repeat" },
			data: inputForm,
		});
	},

	saveInfo: function (inputForm) {
		return request({
			url: prefix + "/sys/user/saveInfo",
			method: "post",
			headers: { arrayFormat: "repeat" },
			data: inputForm,
		});
	},

	savePwd: function (inputForm) {
		return request({
			url: prefix + "/sys/user/savePwd",
			method: "post",
			params: inputForm,
		});
	},

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

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

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

	getMenus: function () {
		return request({
			url: prefix + "/sys/user/getMenus",
			method: "get",
		});
	},

	info: function () {
		return request({
			url: prefix + "/sys/user/info",
			method: "get",
		});
	},

	list: function (params) {
		return request({
			url: prefix + "/sys/user/list",
			method: "get",
			params: params,
		});
	},
	allUserList: function (params) {
		return request({
			url: prefix + "/sys/user/allUserList",
			method: "get",
			params: params,
		});
	},
	certList: function (params) {
		return request({
			url: prefix + "/sys/user/certList",
			method: "get",
			params: params,
		});
	},
	userList: function (params) {
		return request({
			url: prefix + "/sys/user/userList",
			method: "get",
			params: params,
		});
	},
	exportTemplate: function () {
		return request({
			url: prefix + "/sys/user/import/template",
			method: "get",
			responseType: "blob",
		});
	},

	exportExcel: function (params) {
		return request({
			url: prefix + "/sys/user/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	},

	exportSignatureScribeFile: function (params) {
		return request({
			url: prefix + "/sys/user/exportSignatureScribeFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	},

	importExcel: function (data) {
		return request({
			url: prefix + "/sys/user/import",
			method: "post",
			data: data,
		});
	},

	is: function () {
		return request({
			url: prefix + "/sys/user/isAdmin",
			method: "get",
		});
	},
	isKjsz: function () {
		return request({
			url: prefix + "/sys/user/isKjsz",
			method: "get",
		});
	},

	isZj: function () {
		return request({
			url: prefix + "/sys/user/isZj",
			method: "get",
		});
	},
	isDgsbxBmzr: function () {
		return request({
			url: prefix + "/sys/user/isDgsbxBmzr",
			method: "get",
		});
	},
	isZjbry: function () {
		return request({
			url: prefix + "/sys/user/isZjbry",
			method: "get",
		});
	},
	isSs: function () {
		return request({
			url: prefix + "/sys/user/isSs",
			method: "get",
		});
	},
	isBggdgly: function () {
		return request({
			url: prefix + "/sys/user/isBggdgly",
			method: "get",
		});
	},

	queryDetailList(ids) {
		return request({
			url: prefix + `/sys/user/queryDetailList`,
			method: "get",
			params: { ids: ids },
		});
	},
	queryDetailById(id) {
		return request({
			url: prefix + `/sys/user/queryDetailById`,
			method: "get",
			params: { id: id },
		});
	},
	isUpdatePassword: function () {
		return request({
			url: prefix + `/sys/user/isUpdatePassword`,
			method: "get",
			params: {},
		});
	},

	getOffice() {
		return request({
			url: prefix + `/sys/office/treeData?type=2`,
			method: "get",
		});
	},

	updateAllUser() {
		return request({
			url: prefix + `/cwProjectReport/signatureCallBack/updateAllUser`,
			method: "post",
		});
	},
	updateEmail(params) {
		return request({
			url: prefix + `/sys/user/updateEmail`,
			method: "post",
			params: params,
		});
	},
	getMobileById(id) {
		return request({
			url: prefix + `/sys/user/getMobileById`,
			method: "post",
			params: { id: id },
		});
	},
	updateLoginFlag(params) {
		return request({
			url: prefix + `/sys/user/updateLoginFlag`,
			method: "post",
			data: params,
		});
	},
	resetPwd(params) {
		return request({
			url: prefix + `/sys/user/resetPwd`,
			method: "post",
			params: params,
		});
	},
};
