初步联调装表
This commit is contained in:
@@ -40,4 +40,31 @@ export const handleOperateMeterSwitch = async function({ ids = [], status }) {
|
||||
// 绑定时获取电表的最新信息
|
||||
export const getWorkMeterDetail = async function(code = '') {
|
||||
return await GET(`/vx/getWorkMeterDetail?code=${code}`);
|
||||
}
|
||||
|
||||
// 获取某一园区下的电表箱列表
|
||||
export const getParkBoxList = async function({park = "", keyword = "", page = 1}) {
|
||||
return await GET(`/box/${park}?page=${page}&keyword=${replaceSpecialIcon(keyword)}`);
|
||||
}
|
||||
|
||||
// 获取卡列表
|
||||
export const getCardList = async function({park = "", keyword = "", page = 1}) {
|
||||
return await GET(`/equipment/getCardList?page=${page}&park=${park}&keyword=${replaceSpecialIcon(keyword)}`);
|
||||
}
|
||||
|
||||
|
||||
// 获取互感器列表
|
||||
export const getCollectionList = async function({park = "", keyword = "", page = 1}) {
|
||||
return await GET(`/transformer/list/select?page=${page}&park=${park}&transformerId=${replaceSpecialIcon(keyword)}`);
|
||||
}
|
||||
|
||||
|
||||
// 获取库存电表列表
|
||||
export const getInventoryMeter = async function({park = "", keyword = "", page = 1}) {
|
||||
return await GET(`/electricity/list?page=${page}&park=${park}&keyword=${replaceSpecialIcon(keyword)}`);
|
||||
}
|
||||
|
||||
// 新装电表
|
||||
export const installMeter = async function(data) {
|
||||
return await POST(`/wx/workBench/installMeter`, data);
|
||||
}
|
||||
@@ -43,6 +43,26 @@ export const uploadOcrFile = (filePath) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadInstallMeter = (filePath) => {
|
||||
const { api } = getConfigByEnv();
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
filePath: filePath,
|
||||
name: 'data',
|
||||
url: `${api}/image/meter/reading`,
|
||||
header: {
|
||||
authorization: 'Bearer ' + wx.getStorageSync("token")
|
||||
},
|
||||
success: (res) => {
|
||||
resolve(res?.data ? JSON.parse(res?.data) : res?.data);
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadPublicFile = (filePath) => {
|
||||
const { api } = getConfigByEnv();
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user