12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import request from '@/utils/request'
- import constant from '@/constant'
- function list() {
- return request.post(constant.serverUrl + "/base/companyInfo/list");
- }
- function pageList(formData) {
- return request.post(constant.serverUrl + "/base/companyInfo/pageList", formData);
- }
- function create() {
- return request.get(constant.serverUrl + "/base/companyInfo/create");
- }
- function edit(id) {
- return request.get(constant.serverUrl + "/base/companyInfo/edit/" + id);
- }
- function add(formModel) {
- return request.post(constant.serverUrl + "/base/companyInfo/add", formModel, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function update(formModel) {
- return request.post(constant.serverUrl + "/base/companyInfo/update", formModel, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function remove(id) {
- return request.post(constant.serverUrl + "/base/companyInfo/delete/" + id);
- }
- function batchRemove(idList) {
- return request.post(constant.serverUrl + "/base/companyInfo/batchDelete", idList, {
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function queryBindDeviceList(formData) {
- var objData = {};
- formData.forEach((value, key) => objData[key] = value);
- return request.get(constant.serverUrl + "/base/companyInfo/queryBindDeviceList", {
- params: objData,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- function bindDevice(formData) {
- return request.post(constant.serverUrl + "/base/companyInfo/bindDevice", formData);
- }
- function unbindDevice(formData) {
- return request.post(constant.serverUrl + "/base/companyInfo/unbindDevice", formData);
- }
- export default {
- list, create, edit, add, update, remove, batchRemove, pageList, queryBindDeviceList,
- bindDevice, unbindDevice
- }
|