enc-base
Version:
enc-base 核心组件.
41 lines (34 loc) • 1.37 kB
JavaScript
import AjmHttp from 'enc-framework/core/utils/ajm-http';
import AjmConfig from 'enc-framework/core/utils/ajm-config'
// http请求对象
let $http = new AjmHttp({contextPath: AjmConfig.get("BASE_CONTEXT_PATH")}).getHttpClient();
import { URLSearchParams } from 'enc-framework/core/utils/ajm-objects';
let paramMainService = {
// 查询参数服务列表
findParamListByPage(params) {
if (!params) {
params = {};
}
return $http.post('/api/parameter/findParameterByPage', params).then(res => res.data);
},
// 删除参数节点
deleteParamByParamId(params) {
return $http.get('/api/parameter/deleteParameterByParamId/' + params).then(res => res.data);
},
//保存或更新资源
saveOrUpdateParam(params) {
return $http.post('/api/parameter/saveOrUpdate', params).then(res => res.data);
},
//批量删除参数
batchDeleteParams(params){
if(!params){
params = [];
}
return $http.post("/api/parameter/batchDeleteParams/",params).then(res => res.data);
},
//检查参数编码是否重复
checkKey(paraKey, paraId){
return $http.get("/api/parameter/checkParamKey?paramKey=" + paraKey + "¶meterId=" +paraId).then(res => res.data);
},
}
export default paramMainService;