Newer
Older
operation_web / src / components / util / interface.js
@yuwj yuwj on 27 Jan 2021 2 KB 集成数据滤网模块
import department from './apiField/department';
import dataquality from './apiField/dataquality';
import scheduler from './apiField/scheduler';
import dataSource from './apiField/dataSource';
import dataModel from './apiField/dataModel';
import dataJob from './apiField/dataJob';
import model from './apiField/model';
import datafilter from './apiField/datafilter';
import dataPump from './apiField/dataPump';

let host = '/api/newfiber-admin';
let nozzle = {
  'yzm': '/gifCode', //验证码
  'login': '/login', //登录页
  'userList': '/user/list', //获取用户信息
  'deptTreeRole': '/dept/tree', //获取部门节点树信息
  'menuTree': '/menu/tree', //获取菜单管理信息
  'userDelete': '/user/delete', //删除用户
  'addUser': '/user/add', //新增用户
  'upDate': '/user/update', //修改用户
  'upExcel': '/user/excel', //下载用户信息
  'download': '/common/download', //下载用户信息
  'userRole': '/role/list', //获取角色信息
  'deptTree': '/menu/menuButtonTree', //获取菜单权限
  'menuAndPermissionTree': '/menuPermission/menuAndPermissionTree', //获取菜单权限
  'userTree': '/menu/menu', //获取用户菜单
  'userDeleteRole': '/role/delete', //删除用户
  'addUserRole': '/role/add', //新增用户
  'upDateRole': '/role/update', //修改用户
  'upExcelRole': '/role/excel', //下载用户信息
  'gettreeUser': '/user/getUser', //参数获取
  'getUserRole': '/role/getRole', //查询用户信息树节点
  'editPassword': '/user/updatePassword', //修改密码
  'logout': '/logout', //退出登录
  'userPermission': '/userPermission/getList', //用户权限
  'rolePermission': '/rolePermission/getList', //角色权限
  'checkUserName': '/user/checkUserName', //验证用户名是否重复
  'getProjectName': '/user/getProductName', //平台名称
};

// 无工程包的情况
let noHost = {
  'singleFactorPredict': '/api/pumpStation/singleFactorPredict'//测试内容
}

for (let items in department) {
  if (department.hasOwnProperty(items)) {
    nozzle[items] = department[items];
  }
}

// 总体数据
for (let item in nozzle) {
  if (nozzle.hasOwnProperty(item)) {
    nozzle[item] = host + nozzle[item];
  }
}

for (let items in noHost) {
  if (department.hasOwnProperty(items)) {
    nozzle[items] = noHost[items];
  }
}

nozzle = Object.assign(nozzle, dataquality);
nozzle = Object.assign(nozzle, scheduler);
nozzle = Object.assign(nozzle, dataSource);
nozzle = Object.assign(nozzle, dataModel);
nozzle = Object.assign(nozzle, datafilter);
nozzle = Object.assign(nozzle, dataPump);
// 数据模型管理
nozzle = Object.assign(nozzle, dataJob);
nozzle = Object.assign(nozzle, model);
export default nozzle;