import axios from 'axios'
|
export default {
|
/**
|
* 查询状态信息
|
* 无参
|
*/
|
searchStatus() {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify({categoryId:1})
|
});
|
},
|
/**
|
* 查询控制信息
|
* 无参
|
*/
|
searchControl() {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify({categoryId:2})
|
});
|
},
|
/**
|
* 查询控制信息
|
* 无参
|
*/
|
searchConfig() {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify({categoryId:2})
|
});
|
},
|
/**
|
* 批量添加
|
*
|
* @param {Array} list id的集合
|
*
|
*/
|
add(list) {
|
// 处理数据,格式化成需要的数据
|
let searchParams = list.map(item=>{
|
return {
|
id: item,
|
status: 1,
|
}
|
});
|
// 请求后台
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!batchUpdate',
|
data: 'json='+JSON.stringify(searchParams)
|
});
|
},
|
/**
|
* 批量移除
|
*
|
* @param {Array} list id的集合
|
*
|
*/
|
remove(list) {
|
// 处理数据,格式化成需要的数据
|
let searchParams = list.map(item=>{
|
return {
|
id: item,
|
status: 0,
|
}
|
});
|
// 请求后台
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!batchUpdate',
|
data: 'json='+JSON.stringify(searchParams)
|
});
|
},
|
searchVersion() {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify({categoryId:6})
|
});
|
},
|
searchName() {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify({categoryId:5})
|
});
|
},
|
searchParam(data) {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!findByCategoryId',
|
data: 'json='+JSON.stringify(data)
|
});
|
},
|
updateParam(data) {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!updateParamById',
|
data: 'json='+JSON.stringify(data)
|
});
|
},
|
updateStatus(data) {
|
return axios({
|
method: 'post',
|
url: 'PageParamAction!update',
|
data: 'json='+JSON.stringify(data)
|
});
|
},
|
|
/**
|
* 获取实时页面的标签页配置
|
* @returns {AxiosPromise}
|
*/
|
getRealTabsConfig(type) {
|
type = type?type:1;
|
return axios({
|
method: 'post',
|
url: 'PageParamUserAction!getAll',
|
data: "json="+JSON.stringify({
|
type,
|
})
|
});
|
},
|
|
/**
|
* 设置实时页面的标签页配置
|
* @param data 设置的数据
|
* @returns {AxiosPromise}
|
*/
|
addRealTabConfig(data) {
|
return axios({
|
method: 'post',
|
url: 'PageParamUserAction!saveAll',
|
data: 'json='+JSON.stringify(data)
|
});
|
},
|
/**
|
* 查询参数
|
* @returns {AxiosPromise}
|
*/
|
searchPageParam2() {
|
return axios({
|
method: 'post',
|
url: 'PageParam2Action!getVisitSet',
|
data: 'json='+JSON.stringify({categoryId:1})
|
});
|
},
|
/**
|
* 更新参数数据
|
* @param data
|
* @returns {AxiosPromise}
|
*/
|
updatePageParam2(data) {
|
return axios({
|
method: 'post',
|
url: 'PageParam2Action!updateVisitSet',
|
data: 'json='+JSON.stringify(data)
|
});
|
},
|
/**
|
* 查询审计容量数
|
* @returns {AxiosPromise}
|
*/
|
searchAuditCapNumber() {
|
return axios({
|
method: 'post',
|
url: 'PageParam2Action!getAuditCap',
|
data: null
|
});
|
},
|
/**
|
* 更新审计容量数据
|
* @param value 审计容量数
|
* @returns {AxiosPromise}
|
*/
|
updateAuditCapNumber(value) {
|
return axios({
|
method: 'post',
|
url: 'PageParam2Action!updateAuditCap',
|
data: "json="+JSON.stringify({
|
value
|
})
|
});
|
}
|
}
|