| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import request from '@/utils/request'
- import constant from '@/constant'
- import { getToken } from "@/utils/auth"; // get token from cookie
- function pageList(formData) {
- return request.post(constant.serverUrl + "/base/personInfo/pageList", formData);
- }
- function create() {
- return request.get(constant.serverUrl + "/base/personInfo/create");
- }
- function edit(id) {
- return request.get(constant.serverUrl + "/base/personInfo/edit/" + id);
- }
- function add(formModel) {
- return request.post(constant.serverUrl + "/base/personInfo/add", formModel, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function update(formModel) {
- return request.post(constant.serverUrl + "/base/personInfo/update", formModel, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function remove(id) {
- return request.post(constant.serverUrl + "/base/personInfo/delete/" + id);
- }
- function batchRemove(idList) {
- return request.post(constant.serverUrl + "/base/personInfo/batchDelete", idList, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function exportXls() {
- //导出xls
- //return request.post(constant.serverUrl + "/base/personInfo/exportXls");
- window.open(constant.serverUrl + "/base/personInfo/exportXls?token=" + getToken());
- }
- function enabledFace(formData) {
- //人脸授权
- return request.post(constant.serverUrl + "/base/personInfo/enabledFace", formData);
- }
- function enabledCard(formData) {
- //刷卡授权
- return request.post(constant.serverUrl + "/base/personInfo/enabledCard", formData);
- }
- function enabledApp(formData) {
- //手机授权
- return request.post(constant.serverUrl + "/base/personInfo/enabledApp", formData);
- }
- function enabledGuest(formData) {
- //访客授权
- return request.post(constant.serverUrl + "/base/personInfo/EnabledGuest", formData);
- }
- export default {
- pageList, create, edit, add, update, remove, batchRemove, exportXls,
- enabledFace,enabledCard,enabledApp,enabledGuest
- }
|