154 lines
3.3 KiB
JavaScript
154 lines
3.3 KiB
JavaScript
/**
|
|
* 属性管理
|
|
*/
|
|
|
|
/**
|
|
* [settings 属性设置]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function settings(data) {
|
|
return service.get('api/virtual/properties/settings', {
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [agents 代理商设置]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function agents(data) {
|
|
return service.get('api/virtual/properties/agents', {
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [settingsStore 属性设置存储]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function settingsStore(data) {
|
|
return service.post('api/virtual/properties/settings', data);
|
|
}
|
|
|
|
/**
|
|
* [index 属性列表]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function index(data) {
|
|
return service.get('api/virtual/properties/index', {
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [store 属性存储]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function store(data) {
|
|
return serviceForm.post('api/virtual/properties/store', data);
|
|
}
|
|
|
|
/**
|
|
* [export 属性导出]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function exportExcel(data) {
|
|
return service.get('api/virtual/properties/export', {
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [import 属性导入]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function importExcel(file) {
|
|
let config = {
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
}
|
|
};
|
|
|
|
let params = new FormData();
|
|
|
|
params.append('file', file);
|
|
|
|
return service.post('api/virtual/properties/import', params, config);
|
|
}
|
|
|
|
/**
|
|
* [getCarAndplatformList 展示所有的平台车辆]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
|
|
export function getCarTypeToPlatformList(data) {
|
|
return fetch.get('property/list', { params: data })
|
|
}
|
|
|
|
/**
|
|
* [import 展示所有的平台车辆]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
|
|
export function saveCarTypeToPlatform(data) {
|
|
return fetch.post('property/update', data)
|
|
}
|
|
|
|
/**
|
|
* [getPlatformList 展示公司应用]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
|
|
export function getApplyList(data) {
|
|
return fetch.get('properties/platform', { params: data })
|
|
}
|
|
|
|
/**
|
|
* [getPlatformList 展示公司下级机构]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
|
|
export function getAgentsList(data) {
|
|
return fetch.get('properties/agents', { params: data })
|
|
}
|
|
|
|
/**
|
|
* [getPlatformList 展示公司所属套餐]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
|
|
export function getPackageList(data) {
|
|
return fetch.get('properties/package', { params: data })
|
|
}
|
|
|
|
/**
|
|
* [getPlatformSetList 展示平台配置列表]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function getPlatformSetList(data) {
|
|
return fetch.get('setting/list', { params: data })
|
|
}
|
|
|
|
|
|
/**
|
|
* [savePlatformSet 保存平台配置]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function savePlatformSet(data) {
|
|
return fetch.post('setting/save', data)
|
|
}
|