You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
399 lines
15 KiB
399 lines
15 KiB
const http = uni.$u.http |
|
|
|
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分: |
|
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F |
|
const install = (Vue, vm) => { |
|
// 此处没有使用传入的params参数 |
|
let getTenantInfo = (params, config = {}) => http.get('/blade-system/tenant/info', params, config) |
|
// 此处使用了传入的params参数,一切自定义即可 |
|
let login = (params, data) => http.post('/blade-auth/oauth/token?' + params, data, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 退出 |
|
let logout = () => http.get('/blade-auth/oauth/logout') |
|
// 注册 |
|
let registerUser = (params) => http.post('/blade-system/user/register/save-user', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
// 发送验证码 / |
|
let sendVerify = (params) => http.get('/blade-system/user/register/send-verify-code', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
// 首页 |
|
let getworkbench = () => http.post('/blade-auth/oauth/token', params, config) |
|
|
|
// 登录记录 |
|
let getLoginRecords = (params) => http.get('/blade-log/api/logOnList', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 修改记录 |
|
let getEditRecords = () => http.get('/blade-auth/oauth/token', params, config) |
|
// 意见反馈提交 |
|
let subEditRecords = (params) => http.post('/feedback/save', params) |
|
// 获取意见反馈类型 |
|
|
|
// 业务类型查询 |
|
let getChildList = (params) => http.get('/blade-system/dict-biz/child-list', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 获取设备列表 |
|
let getDeviceList = (params) => http.get('/device/list', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
// 需求提报 提交接口 |
|
let workOrderSave = (params) => http.post('/lab-ops/work-order/customer-save', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 需求提报 列表 |
|
let getWorkOrderRecords = (params) => http.get('/lab-ops/work-order/page', { ...params }, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 根据id查询故障详情 |
|
let getBreakdownInfo = (params) => http.get('/lab-ops/work-order/detail', { ...params }, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 修改需求单 |
|
let workOrderupdate = (params) => http.post('/lab-ops/work-order/update', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
|
|
|
|
// 获取维修人员 / |
|
let getRepairPersons = (params) => http.get('/blade-system/user/repairPersons', { ...params }, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
|
|
// 获取物料列表数据 goods/list |
|
let getGoodsList = (params) => http.get('/goods/list', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
|
|
|
|
// 获取人员列表 |
|
let getUserList = (params) => http.get('/blade-system/user/page', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
// 工作台 |
|
// 实验室巡检 /workBenches/workList |
|
let workList = (params) => http.get('/workBenches/workList', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 设备报警 |
|
let deviceList = (params) => http.get('/workBenches/deviceList', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 维修柱状图 |
|
let upkeepStat = (params) => http.get('/workBenches/upkeepStat', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 故障现象分类 workBenches/pieStat |
|
let pieStat = (params) => http.get('/workBenches/pieStat', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 工作台 workBenches/overview |
|
let overview = (params) => http.get('/workBenches/overview') |
|
|
|
// 获取用户信息 / |
|
let getUserInfo = (params) => http.get('/blade-system/user/info', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
|
|
// 派单 /lab/workOrder/update |
|
let sendOrders = (params) => http.get('/workOrder/update', { ...params }, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 关闭接口 / |
|
let cloneOrder = (params) => http.post('/lab-ops/work-order/service-close', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 需求编辑 editData |
|
let editData = (params) => http.post('/workOrder/update', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 维修人员驳回 / |
|
let repairReject = (params) => http.post('/lab-ops/work-order/serviceman-reject', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 申领单提交 / |
|
let applySave = (params) => http.post('/apply/save', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 客服派单 |
|
let serviceman = (params) => http.post('/lab-ops/work-order/service-to-serviceman', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员接收工单 / |
|
let servicemanReceive = (params) => http.post('/lab-ops/work-order/serviceman-receive', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 维修人员提交维修方案 / |
|
let servicemanSubmit = (params) => http.post('/lab-ops/work-order/serviceman-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 魏旭人员确认维修方案 |
|
let supervisorconfirm = (params) => http.post('/lab-ops/work-order/supervisor-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 维修负责人 驳回 维修方案 / |
|
let supervisorReject = (params) => http.post('/lab-ops/work-order/supervisor-reject', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户确认维修方案 |
|
let customerConfirm = (params) => http.post('/lab-ops/work-order/customer-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户驳回维修方案 |
|
let customerReject = (params) => http.post('/lab-ops/work-order/customer-reject', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员确认维修完成 |
|
let servicemanRepairSubmit = (params) => http.post('/lab-ops/work-order/serviceman-repair-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 评价 已完成 提交 |
|
let evaluateSign = (params) => http.post('/lab-ops/work-order/customer-repair-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 评价 未完成 提交 |
|
let evaluateRepairReject = (params) => http.post('/lab-ops/work-order/customer-repair-reject', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
//扫码获取设备id 通过id获取详情 |
|
let getDeviceDetail = (params) => http.get('/device/detail', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员存取经纬度 |
|
let updateCoordinate = (params) => http.post('/blade-system/user/updateCoordinate', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 巡检计划列表 / |
|
let getDictionaryList = (params) => http.get('/lab-ops/maintenance/plan-page', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 巡检计划 详情 |
|
let getPlanDetail = (params) => http.get('/lab-ops/maintenance/plan-detail', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 获取巡检任务列表 |
|
let getTaskPage = (params) => http.get('/lab-ops/maintenance/task-page', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 获取巡检任务详情 |
|
let getTaskDetail = (params) => http.get('/lab-ops/maintenance/task-detail', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 获取巡检维修详情 |
|
let getRepairDetail = (params) => http.get('/lab-ops/maintenance/repair-detail', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 主管审核并指定维修人员 |
|
let taskSupervisorconfirm = (params) => http.post('/lab-ops/maintenance/task-supervisor-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
//维修人员确认接收 |
|
let taskServicemanreceive = (params) => http.post('/lab-ops/maintenance/task-serviceman-receive', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
//维修人员更新上门时间 |
|
let taskServicemanUpdateTime = (params) => http.post('/lab-ops/maintenance/task-serviceman-update-time', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 巡检维修列表 |
|
let getRepairPage = (params) => http.get('/lab-ops/maintenance/repair-page', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员 更新明细接口 |
|
let updateDetaile = (params) => http.post('/lab-ops/maintenance/task-serviceman-update-detail', params, { |
|
authorizations: true, |
|
isparams: true |
|
}) |
|
// 巡检完成 |
|
let taskServicemanSubmit = (params) => http.post('/lab-ops/maintenance/task-serviceman-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 客户确认巡检完成 |
|
let taskCustomerConfirm = (params) => http.post('/lab-ops/maintenance/task-customer-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户确认未巡检完成 |
|
let taskCustomerRefuse = (params) => http.post('/lab-ops/maintenance/task-customer-refuse', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员 保存维修方案 |
|
let taskSolutionSave = (params) => http.post('/lab-ops/maintenance/repair-solution-save', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 维修人员 提交维修方案 |
|
let taskSolutionSubmit = (params) => http.post('/lab-ops/maintenance/repair-solution-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修主管 审批维修方案 通过 |
|
let repairSolutionSupervisor = (params) => http.post('/lab-ops/maintenance/repair-solution-supervisor-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 维修主管 审批维修方案 驳回 |
|
let repairSolutionRefuse = (params) => http.post('/lab-ops/maintenance/repair-solution-supervisor-refuse', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 客户 确认巡检维修方案 通过 |
|
let repairSolutionCustomer = (params) => http.post('/lab-ops/maintenance/repair-solution-customer-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户 确认巡检维修方案 驳回 |
|
let repairCustomerRefuse = (params) => http.post('/lab-ops/maintenance/repair-solution-customer-refuse', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 维修人员 确认维修是否完成 |
|
let repairServicemanSubmit = (params) => http.post('/lab-ops/maintenance/repair-serviceman-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户 确认完成 |
|
let repairConfirmFinish = (params) => http.post('/lab-ops/maintenance/repair-customer-confirm-finish', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客户 确认未完成 |
|
let repairRefuseFinish = (params) => http.post('/lab-ops/maintenance/repair-customer-refuse-finish', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客服 确认付款 |
|
let confirmPayment = (params) => http.post('/lab-ops/maintenance/repair-service-confirm', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 更新维修人员经纬度 |
|
let updatePosition = (params) => http.post('/blade-system/user/updateCoordinate', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 获取 |
|
let getPosition = (params) => http.get('/blade-system/user/getCoordinate', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 忘记密码 |
|
let resetPwd = (params) => http.post('/blade-system/user/register/reset-pwd', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 通知公告/ |
|
let getNoticeList = (params) => http.get('/blade-desk/notice/list', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 巡检 新加签名和备注字段接口 |
|
let updateSign = (params) => http.post('/lab-ops/maintenance/task-serviceman-update-sign', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 获取消息列表 |
|
let getMesseageList = (params) => http.get('/messeage/list', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 一键已读 |
|
let getMesseageAll = (params) => http.post('/messeage/updateStatusAll', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 更改消息状态 |
|
let updateMesseageStatus = (params) => http.post('/messeage/updateStatus', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 更改消息状态 |
|
let getMesseageTotal = (params) => http.get('/messeage/total', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
// 客服关闭 |
|
let closeService = (params) => http.post('/lab-ops/work-order/service-repair-submit', params, { |
|
authorizations: true, |
|
isparams: false |
|
}) |
|
|
|
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 |
|
vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit,repairConfirmFinish,repairRefuseFinish ,confirmPayment,getPosition,getRepairDetail,updatePosition,resetPwd,getNoticeList,updateSign,getMesseageList,getMesseageAll,updateMesseageStatus,getMesseageTotal,closeService}; |
|
} |
|
|
|
export default { |
|
install |
|
} |