1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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(formData) {
- //导出xls
- return request.post(constant.serverUrl + "/base/personInfo/exportXls", formData);
- //window.open(constant.serverUrl + "/base/personInfo/exportXls?token=" + getToken());
- }
- function enabledFace(formData) {
- //人脸授权
- return request.post(constant.serverUrl + "/base/personInfo/enabledFace", formData);
- }
- function enabledFaceList(ids) {
- //批量人脸授权
- return request.post(constant.serverUrl + "/base/personInfo/enabledFaceList", ids, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- 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);
- }
- function dataSync(idList) {
- //数据同步
- return request.post(constant.serverUrl + "/base/personInfo/dataSync", idList, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- export default {
- pageList, create, edit, add, update, remove, batchRemove, exportXls,
- enabledFace, enabledCard, enabledApp, enabledGuest, dataSync, enabledFaceList
- }
|