巡检记录接口对接
This commit is contained in:
15
wuye-manager-uniapp/api/BaseUrl.js
Normal file
15
wuye-manager-uniapp/api/BaseUrl.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @Description: 抽离 公共基础地址
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-18 15:36:10
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-18 15:36:21
|
||||
*/
|
||||
let baseUrl = ''
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = 'http://192.168.0.239:8080' // 开发环境
|
||||
} else {
|
||||
baseUrl = 'http://192.168.0.239:8080' // 生产环境
|
||||
}
|
||||
export default baseUrl;
|
||||
@@ -3,9 +3,12 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-15 11:37:01
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-15 17:02:25
|
||||
* @LastEditTime: 2026-05-18 15:34:07
|
||||
*/
|
||||
import request, { get, post } from './request.js'
|
||||
import request, {
|
||||
get,
|
||||
post
|
||||
} from './request.js'
|
||||
|
||||
/**
|
||||
* @typedef EmployeeItem 员工信息项
|
||||
@@ -61,8 +64,19 @@ export function getSystemUsers_employee(roleKey, keyword) {
|
||||
* @param {string} [keyword=''] - 搜索关键词(可选),房屋号/业主姓名
|
||||
* @returns {Promise<RowsResult<HouseItem>>}
|
||||
*/
|
||||
export function getVillageHouseList_keyword(data, keyword) {
|
||||
export function getVillageHouseList_keyword(data, searchValue = '') {
|
||||
return get(
|
||||
`/manage/replace/sdb/village/house?pageSize=${data.pageSize}&pageNum=${data.pageNum}&keyword=${keyword}`
|
||||
`/manage/replace/sdb/village/house?pageSize=${data.pageSize}&pageNum=${data.pageNum}&searchValue=${searchValue}`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 管家端通用 文件上传
|
||||
* @param {FormData} file
|
||||
* @return
|
||||
*/
|
||||
export function uploadFile(file) {
|
||||
return post('/resource/oss/upload', file)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-15 08:50:47
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-15 16:47:31
|
||||
* @LastEditTime: 2026-05-16 15:42:36
|
||||
*/
|
||||
import request, {
|
||||
filterParams,
|
||||
|
||||
74
wuye-manager-uniapp/api/insepction.js
Normal file
74
wuye-manager-uniapp/api/insepction.js
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @Description: 巡检记录 API
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-16 15:43:07
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-18 16:35:05
|
||||
*/
|
||||
|
||||
import request, {
|
||||
filterParams,
|
||||
get,
|
||||
put,
|
||||
post
|
||||
} from "./request.js";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @typedef PointsType 巡检任务表
|
||||
* @property {string} id = [巡检点ID]
|
||||
* @property {string[]} itemNames = [巡检项目名称]
|
||||
* @property {string[]} itemIds = [巡检项目ID]
|
||||
* @property {string} pointName = [巡检点名称]
|
||||
* */
|
||||
/**
|
||||
* @typedef InspectionListType 巡检任务表
|
||||
* @property {string} id = [巡检任务ID]
|
||||
* @property {string} taskName = [巡检任务名称]
|
||||
* @property {string} taskTime = [巡检任务执行时间]
|
||||
* @property {string} taskStatus = [巡检状态]
|
||||
* @property {string} planName = [巡检计划]
|
||||
* @property {string} inspectorName = [巡检人员]
|
||||
* @property {string} executeDate = [巡检日期]
|
||||
* @property {PointsType[]} points = [巡检点]
|
||||
* @property {string[]} [itemslist] = [巡检项目]
|
||||
* */
|
||||
/**
|
||||
* @description: 获取巡检任务列表
|
||||
* @param { RequestParams<{ date?:string }> } data
|
||||
* @return { Promise<RowsResult<InspectionListType>> }
|
||||
*/
|
||||
export const getInspectionList = (data) => {
|
||||
return get('/api/inspection/today/list', filterParams(data))
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 获取 巡检任务详情
|
||||
* @param {string} id
|
||||
* @return
|
||||
*/
|
||||
export const getInspectionMain = (id) => {
|
||||
return get('/api/inspection/today/detail', {
|
||||
taskId: id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @typedef inspectionPointParams 巡检任务表
|
||||
* @property {string} pointId = [巡检点ID]
|
||||
* @property {string} imgUrl = [巡检点,图片上传]
|
||||
* @property {string} remark = [巡检点 巡检描述]
|
||||
* @property {string} taskId = [巡检任务ID]
|
||||
* @property {number} status = [巡检点状态] 0正常1异常
|
||||
* */
|
||||
/**
|
||||
* @description: 巡检点上传
|
||||
* @param {inspectionPointParams} data
|
||||
*/
|
||||
export const putInsepctionPoint = (data) => {
|
||||
return post('/api/inspection/today/pointImg', data)
|
||||
}
|
||||
@@ -1,4 +1,50 @@
|
||||
/**
|
||||
* @Description: 仪表换新API
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-16 15:53:23
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-16 16:38:54
|
||||
*/
|
||||
import request, {
|
||||
filterParams,
|
||||
get,
|
||||
post
|
||||
post,
|
||||
put
|
||||
} from "./request.js"
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型枚举
|
||||
* @typedef {1 | 2} DeviceType
|
||||
* @description 1=水表 2=电表
|
||||
*/
|
||||
/**
|
||||
* @typedef ReplaceMentRecordList 巡检任务表
|
||||
* @property {string} deviceCode = [设备编号]
|
||||
* @property {DeviceType} deviceType = [设备类型]
|
||||
* @property {string} houseId = [楼栋ID]
|
||||
* @property {string} buildingName = [楼栋名称]
|
||||
* @property {string} unitNo = [单元号]
|
||||
* @property {string} houseNo = [房屋号]
|
||||
* @property {string} addressCn = [房屋地址]
|
||||
* @property {string} addressHyphen = [房屋地址]
|
||||
* @property {string} createTime = [创建时间]
|
||||
* */
|
||||
|
||||
/**
|
||||
* 获取仪表换新记录
|
||||
* @param {RequestParams} data 请求参数
|
||||
* @return {Promise<RowsResult<ReplaceMentRecordList>>}
|
||||
*/
|
||||
export const getReplaceMainList = (data) => {
|
||||
return get('/manage/replace/sdb/record/list', filterParams(data))
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 添加仪表API
|
||||
* @param {{ deviceType:DeviceType, deviceCode:string,houseId:string }} data
|
||||
*/
|
||||
export const AddReplaceMainList = (data) => {
|
||||
return put('/manage/replace/sdb/replace/device', filterParams(data))
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
let baseUrl = ''
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = 'http://192.168.0.239:8080' // 开发环境
|
||||
} else {
|
||||
baseUrl = 'http://192.168.0.239:8080' // 生产环境
|
||||
}
|
||||
import baseUrl from './BaseUrl.js'
|
||||
|
||||
export default function request(url, data = {}, method = 'GET') {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user