|
@ -171,9 +171,10 @@ async function get (ctx) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查在安心云绑定的数据
|
|
|
// 查在安心云绑定的数据
|
|
|
const axbindCameraRes = cameraIds.length ? |
|
|
const axbindCameraRes = [] |
|
|
await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) |
|
|
// cameraIds.length ?
|
|
|
: [] |
|
|
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
|
|
|
|
|
|
// : []
|
|
|
|
|
|
|
|
|
// 查用户信息
|
|
|
// 查用户信息
|
|
|
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) |
|
|
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) |
|
@ -236,7 +237,7 @@ async function del (ctx, next) { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (cameraIds.length) { |
|
|
if (cameraIds.length) { |
|
|
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) |
|
|
// await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await transaction.commit(); |
|
|
await transaction.commit(); |
|
@ -290,7 +291,8 @@ async function detail (ctx) { |
|
|
cameras.push(c.dataValues) |
|
|
cameras.push(c.dataValues) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const cameraProject = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) |
|
|
const cameraProject = [] |
|
|
|
|
|
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
|
|
|
const bindStations = [] |
|
|
const bindStations = [] |
|
|
for (let c of cameraProject) { |
|
|
for (let c of cameraProject) { |
|
|
for (let s of c.stations) { |
|
|
for (let s of c.stations) { |
|
@ -397,10 +399,10 @@ async function nvrExport (ctx) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查在安心云绑定的数据
|
|
|
// 查在安心云绑定的数据
|
|
|
const axbindCameraRes = |
|
|
const axbindCameraRes = [] |
|
|
cameraIds.length ? |
|
|
// cameraIds.length ?
|
|
|
await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) |
|
|
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
|
|
|
: [] |
|
|
// : []
|
|
|
|
|
|
|
|
|
// 查用户信息
|
|
|
// 查用户信息
|
|
|
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) |
|
|
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) |
|
|