192 lines
9.7 KiB
JavaScript
192 lines
9.7 KiB
JavaScript
|
|
const ENV = process.env.NODE_ENV;
|
|||
|
|
class HttpConfig {
|
|||
|
|
// #ifdef H5
|
|||
|
|
// baseUrl = "/api"
|
|||
|
|
// #endif
|
|||
|
|
// #ifdef APP-PLUS
|
|||
|
|
// baseUrl = "http://112.29.103.165:21624"
|
|||
|
|
// baseUrl = "http://192.168.0.14:21624"
|
|||
|
|
// baseUrl = "http://192.168.0.56:21626"
|
|||
|
|
// baseUrl = "http://192.168.0.14:18866"
|
|||
|
|
// baseUrl = "http://112.29.103.165:21626"
|
|||
|
|
// baseUrl = "http://172.20.10.3:8080"
|
|||
|
|
// baseUrl = "http://10.40.92.9:8080"
|
|||
|
|
// baseUrl = "http://10.40.92.60:28080"
|
|||
|
|
// baseUrl = "http://10.40.92.138:28080"
|
|||
|
|
// baseUrl = "http://10.40.92.52:28080"
|
|||
|
|
// baseUrl = "http://10.40.92.140:28080"
|
|||
|
|
// baseUrl = "https://z.csgmall.com.cn/gl"
|
|||
|
|
// baseUrl = "http://192.168.2.160:39080" // 梁超
|
|||
|
|
// baseUrl = "http://192.168.2.218:39080" // 福
|
|||
|
|
target = "http://192.168.2.158:49080"; // 开发阶段后台ip
|
|||
|
|
// #endif
|
|||
|
|
// 基地址 (部署时使用 需要加 dev-api)
|
|||
|
|
// authPath = `${this.baseUrl}/dev-api/auth`
|
|||
|
|
// systemPath = `${this.baseUrl}/dev-api/system`
|
|||
|
|
// basePath = `${this.baseUrl}/dev-api/base`
|
|||
|
|
// materialPath = `${this.baseUrl}/dev-api/material`
|
|||
|
|
baseUrl =
|
|||
|
|
ENV === "production"
|
|||
|
|
? "https://test-cc.zhgkxt.com/sgzbgl-api"
|
|||
|
|
: this.target;
|
|||
|
|
authPath =
|
|||
|
|
ENV === "production" ? `${this.baseUrl}/auth` : `${this.baseUrl}/auth`;
|
|||
|
|
systemPath =
|
|||
|
|
ENV === "production"
|
|||
|
|
? `${this.baseUrl}/system`
|
|||
|
|
: `${this.baseUrl}/system`;
|
|||
|
|
basePath =
|
|||
|
|
ENV === "production"
|
|||
|
|
? `${this.baseUrl}/material/base`
|
|||
|
|
: `${this.baseUrl}/material/base`;
|
|||
|
|
materialPath =
|
|||
|
|
ENV === "production"
|
|||
|
|
? `${this.baseUrl}/material`
|
|||
|
|
: `${this.baseUrl}/material`;
|
|||
|
|
// 短链
|
|||
|
|
serviceUrl = {
|
|||
|
|
login: {
|
|||
|
|
code: "/sendCode", // 获取验证码
|
|||
|
|
checkCode: "/checkCode", // 验证码登录
|
|||
|
|
log: "/loginApp", // 账户登录
|
|||
|
|
},
|
|||
|
|
user: {
|
|||
|
|
logOut: "/logout", // 退出登录
|
|||
|
|
},
|
|||
|
|
index: {
|
|||
|
|
noticeCont: "/sysNotice/getList", // 获取公告内容
|
|||
|
|
singleNotice: "/notice/list", // 查看单个公告
|
|||
|
|
waitDo: "/app/getToDoList", // 获取待办事项
|
|||
|
|
keyData: "/app/getCriticalData", // 获取关键数据
|
|||
|
|
getUserInfo: "/user/getInfo", // 获取用户信息
|
|||
|
|
fetchCompanyName: "/dept/getCompanyByAncestors", // 获取公司名称
|
|||
|
|
},
|
|||
|
|
fetchMaterial: {
|
|||
|
|
fetchMaterialList: "/type/selectMaTypeListByLevelIndex", // 获取设备列表
|
|||
|
|
getDeptList: "/select/getUnitCbx", // 获取往来单位列表
|
|||
|
|
getProjList: "/select/getSectionEngineeringCbx", // 获取工程列表
|
|||
|
|
getDeviceDetail: "/type/selectMaTypeTreeByLevel", // 获取机具详情
|
|||
|
|
getCartDetail: "/leaseUserBook", // 查询预约车内所有商品
|
|||
|
|
addItemToCart: "/leaseUserBook", // 向预约车内添加商品
|
|||
|
|
delCart: "/leaseUserBook", // 删除预约车商品
|
|||
|
|
subCart: "/tm_task/submitLeaseApply", // 提交预约车
|
|||
|
|
itemNumChange: "/leaseUserBook/update", // 预约车数量加减
|
|||
|
|
},
|
|||
|
|
fetchExam: {
|
|||
|
|
fetchExamList: "/tm_task/getLeaseAuditList", // 获取领料审批清单
|
|||
|
|
fetchExamListAll: "/tm_task/getLeaseAuditListAll", // 获取领料申请列表
|
|||
|
|
fetchTrueExamList: "/tm_task/getLeaseManageListAll", // 获取领料审批列表
|
|||
|
|
fetchTrueExamListCq: "/tm_task/getLeaseManageListAllCq", // 获取重庆领料审批列表
|
|||
|
|
fetchDetailList: "/tm_task/getLeaseListAllCq", // 获取领料明细列表
|
|||
|
|
subExam: "/tm_task/auditLeaseByCompany", // 通过领料审批
|
|||
|
|
subExamCq: "/tm_task/auditLeaseByCompanyCq", // 通过重庆领料审批
|
|||
|
|
rejectExam: "/tm_task/rejectLeaseByCompany", // 驳回领料审批
|
|||
|
|
rejectExamCq: "/tm_task/rejectLeaseByCompanyCq", // 驳回重庆领料审批
|
|||
|
|
},
|
|||
|
|
fetchMaterialOutStore: {
|
|||
|
|
fetchInfoByCode: "/leaseOutDetails/getMaMachineByCode", // 根据maId获取机具详情
|
|||
|
|
fetchInfoByQrCode: "/leaseOutDetails/getMaMachineByQrCode",
|
|||
|
|
subOutStore: "/leaseOutDetails/submitOut", // 领料出库提交-对象
|
|||
|
|
subOutStoreArr: "/leaseOutDetails/submitOutRfid", // 领料出库提交-数组
|
|||
|
|
fetchSingleDetail: "/tm_task/getLeaseAuditListDetail", // 根据领料id查询领料申请详情
|
|||
|
|
searchRfid: "/backReceive/rfidCodeQuery", // 查询rfid
|
|||
|
|
},
|
|||
|
|
exitMaterial: {
|
|||
|
|
exitDeptList: "/back_apply/getbackUnit", // 获取退料单位,工程列表
|
|||
|
|
exitMaterialList: "/back_apply/getbackList", // 获取机具退料列表
|
|||
|
|
exitMaterialDetail: "/back_apply/view", // 获取退料设备详情
|
|||
|
|
subExitMaterial: "/back_apply/upload", // 提交退料清单
|
|||
|
|
delMaterial: "/back_apply/del", // 删除退料申请
|
|||
|
|
newExitList: "/back_apply/addBackTask", // 新建退料任务单
|
|||
|
|
selectMaterial: "/back_apply/materialList", // 退料物料选择
|
|||
|
|
ifAgreement: "/select/getAgreementInfoById", // 单位id和工程id是否匹配
|
|||
|
|
},
|
|||
|
|
exitExam: {
|
|||
|
|
exitExamList: "/back_apply/examineList", // 获取退料审核列表
|
|||
|
|
exitExamDetail: "/back_apply/examineView", // 获取退料审核明细
|
|||
|
|
subExitExam: "/back_apply/audit", // 提交单个审核
|
|||
|
|
rejectExitExam: "/back_apply/refuse", // 拒绝单个审核
|
|||
|
|
},
|
|||
|
|
newInStore: {
|
|||
|
|
// fetchNewInStoreList: '/purchaseInput/list', // 获取新购入库列表
|
|||
|
|
fetchNewInStoreList: "/purchaseCheckInfo/putInList", // 获取新购入库列表
|
|||
|
|
fetchNewBuyDetail: "/purchaseMacode/putinDetails", // 获取新购入库详情
|
|||
|
|
subNewBuy: "/purchaseInput/manageStatus", // 新购明细提交审核
|
|||
|
|
},
|
|||
|
|
fix: {
|
|||
|
|
fixList: "/repair/getAppRepairTaskList", // 获取维修列表
|
|||
|
|
fixDetail: "/repair/getAppRepairMaTypeList", // 获取维修明细
|
|||
|
|
fixExam: "/repair/endRepairTask", // 提交维修审核
|
|||
|
|
completeFix: "/repair/completeRepair", // 维修完成
|
|||
|
|
submitFix: "/repair/submitRepairApply", // 提交维修申请
|
|||
|
|
// fixCrew: '/repair/getUserSelect', // 获取维修人员
|
|||
|
|
fixCrew: "/user/getUserByRoleList", // 获取维修人员
|
|||
|
|
maList: "/maPartType/list", // 获取配件树
|
|||
|
|
fixFactory: "/supplierInfo/getSupplierSelect", // 获取维修厂家
|
|||
|
|
uploadPic: "/sys/file/upload", // 图片上传接口
|
|||
|
|
},
|
|||
|
|
repairTestInStore: {
|
|||
|
|
repairTestInStoreList: "/RepairTestInput/getAppRepairedList", // 获取修试后入库列表
|
|||
|
|
repairTestInStoreDetail:
|
|||
|
|
"/RepairTestInput/getAppRepairedDetailList", // 获取修试后列表详情
|
|||
|
|
processOrReject: "/RepairTestInput/inputByType", // 修试审核通过或驳回
|
|||
|
|
},
|
|||
|
|
backMaterialReceive: {
|
|||
|
|
backMaterialReceiveList: "/backReceive/getbackReceiveList", // 获取退料接收列表
|
|||
|
|
// backMaterialReceiveDetail: '/backReceive/receiveView',
|
|||
|
|
backMaterialReceiveDetail: "/backReceive/receiveViewWeb",
|
|||
|
|
backMaterialSetNumBack: "/backReceive/setNumBack",
|
|||
|
|
backMaterialQrcodeQuery: "/backReceive/qrcodeQuery",
|
|||
|
|
backMaterialSetCodeBack: "/backReceive/setCodeBack",
|
|||
|
|
backReceiveCodeQuery: "/backReceive/codeQuery",
|
|||
|
|
backReceiveEndBack: "/backReceive/endBack",
|
|||
|
|
seeBackMaterialDetail: "/backReceive/backReceiveRecord", // 查看退料明细
|
|||
|
|
searchRfid: "/backReceive/rfidCodeQuery", // 查询rfid
|
|||
|
|
subRfid: "/backReceive/setRfidCodeBack", // rfid接收
|
|||
|
|
searchByCode: "/backReceive/getBackMachineApp", // 根据编码查询该工程下的设备
|
|||
|
|
searchCodeDevice: "/backReceive/getBackMachine", // 根据编码查询该工程下的设备
|
|||
|
|
returnGetRecord: "/backReceive/getRecord", // 根据编码查询该工程下的设备
|
|||
|
|
},
|
|||
|
|
// 报废审核接口
|
|||
|
|
crashExam: {
|
|||
|
|
crashExamList: "/scrap/getScrapTaskList",
|
|||
|
|
crashExamDetails: "/scrap/getScrapAuditList",
|
|||
|
|
crashExamAudit: "/scrap/audit",
|
|||
|
|
},
|
|||
|
|
//试验检验接口
|
|||
|
|
testExam: {
|
|||
|
|
testExamList: "/details/questList",
|
|||
|
|
testExamDetails: "/details/getRepairAuditList",
|
|||
|
|
testExamAudit: "/details/audit",
|
|||
|
|
},
|
|||
|
|
authManage: {
|
|||
|
|
fetchAuthList: "/appMenu/getAllMenu", // 获取所有模块数据
|
|||
|
|
fetchIsUsing: "/appMenu/getMenuById", // 获取正在使用的模块
|
|||
|
|
subAdd: "/appMenu/addMenuById", // 提交新增模块
|
|||
|
|
subDel: "/appMenu/delMenuById", // 提交删除模块
|
|||
|
|
},
|
|||
|
|
searchProjUsing: {
|
|||
|
|
fetchProjUsingList: "/leaseOutDetails/proUseRecord", // 获取工程在用列表
|
|||
|
|
},
|
|||
|
|
searchFetchRecord: {
|
|||
|
|
fetchRecordList: "/leaseOutDetails/leaseOutRecord", // 获取领用记录列表
|
|||
|
|
},
|
|||
|
|
update: {
|
|||
|
|
fetchAppVer: "/app/getVersion", // 获取app当前版本号
|
|||
|
|
},
|
|||
|
|
rfidBinding: {
|
|||
|
|
bindRfid: "/leaseOutDetails/bindMachineByRfid", // rifd绑定
|
|||
|
|
},
|
|||
|
|
qrcodeBinding: {
|
|||
|
|
bindQrcode: "/leaseOutDetails/bindMachineByQrCode", // 二维码绑定
|
|||
|
|
fetchDeviceType: "/returnOfMaterialsInfo/getMaTypeList", // 获取设备类型
|
|||
|
|
fetchDeviceSpec: "/returnOfMaterialsInfo/getInfoListByType", // 获取规格型号
|
|||
|
|
},
|
|||
|
|
indexScan: {
|
|||
|
|
infoByCode: "/machine/getMachineByQrCode", // 首页根据二维码查询设备信息
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export default new HttpConfig();
|