From 77efe48d7c03fa7cc86579b89ebfda0c361e058c Mon Sep 17 00:00:00 2001 From: yuan_yi <1650192445@qq.com> Date: Wed, 1 Jun 2022 18:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=E5=BB=BA=E8=AE=BE?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/app/lib/controllers/camera/create.js | 82 ++++- .../api/app/lib/controllers/camera/index.js | 20 +- .../api/app/lib/controllers/nvr/index.js | 39 ++- code/VideoAccess-VCMP/api/app/lib/index.js | 1 + .../api/app/lib/models/camera.js | 17 -- .../api/app/lib/models/camera_ability.js | 58 ++-- .../api/app/lib/models/camera_ability_bind.js | 56 ++++ .../api/app/lib/models/gb_camera.js | 279 +++++++++--------- .../api/app/lib/models/nvr.js | 244 +++++++-------- .../api/app/lib/utils/xlsxDownload.js | 2 +- .../api/sequelize-automate.config.js | 2 +- .../assets/images/background/building.jpg | Bin 0 -> 12860 bytes .../web/client/src/components/coming.jsx | 22 ++ .../web/client/src/components/index.js | 4 +- .../equipmentWarehouse/containers/index.js | 4 +- .../equipmentWarehouse/containers/recycle.jsx | 18 ++ .../sections/equipmentWarehouse/nav-item.jsx | 23 +- .../src/sections/equipmentWarehouse/routes.js | 43 +-- 18 files changed, 550 insertions(+), 364 deletions(-) create mode 100644 code/VideoAccess-VCMP/api/app/lib/models/camera_ability_bind.js create mode 100644 code/VideoAccess-VCMP/web/client/assets/images/background/building.jpg create mode 100644 code/VideoAccess-VCMP/web/client/src/components/coming.jsx create mode 100644 code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/recycle.jsx diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js index 4aa16a9..3af5b2e 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js @@ -4,6 +4,7 @@ const moment = require('moment') async function createYingshi (ctx) { let errMsg = '添加萤石摄像头失败' + const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc const { userId, token } = ctx.fs.api @@ -13,6 +14,7 @@ async function createYingshi (ctx) { id, name, cloudControl, highDefinition, memoryCard, voice, kindId, abilityId, rtmp, serialNo, longitude, latitude, } = ctx.request.body; + let handleCameraId = id const serialNo_ = String(serialNo).toUpperCase() const secretRes = await models.SecretYingshi.findAll() @@ -39,25 +41,52 @@ async function createYingshi (ctx) { let storageData = { type: 'yingshi', name, cloudControl, highDefinition, memoryCard, - voice, longitude, latitude, kindId, abilityId, rtmp, + voice, longitude, latitude, kindId, rtmp, + serialNo: serialNo_, yingshiSecretId: cameraBeloneSecretId } - if (id) { + if (handleCameraId) { await models.Camera.update(storageData, { where: { - id, - } + id: handleCameraId, + }, + transaction }) } else { storageData.createTime = moment().format() storageData.createUserId = userId storageData.forbidden = false - await models.Camera.create(storageData) + const createRes = await models.Camera.create(storageData, { + transaction + }) + handleCameraId = createRes.id } + await models.CameraAbilityBind.destroy({ + where: { + cameraId: handleCameraId + }, + transaction + }) + if (abilityId && handleCameraId) { + let storageData = abilityId.map(aid => { + return { + cameraId: handleCameraId, + abilityId: aid + } + }) + if (storageData.length) { + await models.CameraAbilityBind.bulkCreate(storageData, { + transaction + }) + } + } + + await transaction.commit(); ctx.status = 204; } catch (error) { + await transaction.rollback(); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = { @@ -172,36 +201,65 @@ async function createNvrCamera (ctx) { } async function createIpcCamera (ctx) { + const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc const { userId, token } = ctx.fs.api const { id, name, cloudControl, memoryCard, - voice, longitude, latitude, rtmp, + voice, longitude, latitude, venderId, rtmp, serialNo, kindId, abilityId, } = ctx.request.body; + let handleCameraId = id let storageData = { type: 'ipc', name, cloudControl, memoryCard, - voice, longitude, latitude, rtmp, - serialNo, kindId, abilityId, + voice, longitude, latitude, rtmp, venderId, + serialNo, kindId, } - if (id) { + if (handleCameraId) { await models.Camera.update(storageData, { where: { - id, - } + id: handleCameraId, + }, + transaction }) } else { storageData.createTime = moment().format() storageData.createUserId = userId storageData.forbidden = false - await models.Camera.create(storageData) + const createRes = await models.Camera.create(storageData, { + transaction + }) + handleCameraId = createRes.id } + + await models.CameraAbilityBind.destroy({ + where: { + cameraId: handleCameraId + }, + transaction + }) + if (abilityId && handleCameraId) { + let storageData = abilityId.map(aid => { + return { + cameraId: handleCameraId, + abilityId: aid + } + }) + if (storageData.length) { + await models.CameraAbilityBind.bulkCreate(storageData, { + transaction + }) + } + } + + await transaction.commit(); ctx.status = 204; } catch (error) { + await transaction.rollback(); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = {} diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js index f55dd01..4efc107 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -19,11 +19,12 @@ async function getCameraProject (ctx, next) { [orderBy || 'id', orderDirection || 'DESC'] ], include: [{ - model: models.CameraAbility - }, { model: models.CameraKind }] } + let abilityFind = { + model: models.CameraAbility + } if (limit) { findOption.limit = limit } @@ -40,13 +41,16 @@ async function getCameraProject (ctx, next) { if (type) { findOption.where.type = type } - if (abilityId) { - findOption.where.abilityId = abilityId - } if (venderId) { findOption.where.venderId = venderId } + if (abilityId) { + abilityFind.where = { + abilityId: abilityId + } + } + findOption.include.push(abilityFind) const cameraRes = await models.Camera.findAll(findOption) const total = await models.Camera.count({ where: findOption.where @@ -356,10 +360,10 @@ async function cameraExport (ctx) { exportData.push(camera) } - - const filePath = await simpleExcelDown({ data: exportData, header, fileName: `摄像头信息列表_${userId}_${moment().format('YYYYMMDDHHmmss')}` }) + const fileName = `摄像头信息列表_${userId}_${moment().format('YYYYMMDDHHmmss')}` + '.csv' + const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName }) const fileData = fs.readFileSync(filePath); - let fileName = filePath.split('/').pop() + ctx.status = 200; ctx.set('Content-Type', 'application/x-xls'); ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName)); diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js index cbe4cda..01d58a6 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js @@ -3,16 +3,34 @@ const fs = require('fs'); const moment = require('moment') async function edit (ctx, next) { + let errMsg = '添加 NVR 设备失败' const transaction = await ctx.fs.dc.orm.transaction(); try { - const models = ctx.fs.dc.models; + const { utils: { getCameraLevel3ByStreamId } } = ctx.app.fs + const { models } = ctx.fs.dc; const { userId } = ctx.fs.api const data = ctx.request.body; + const { serialNo } = data + + const nvrGbRes = await models.GbCamera.findOne({ + where: { + streamid: serialNo, + level: 0 + } + }) + + if (!nvrGbRes) { + errMsg = '没有找到已接入的 NVR 服务信息' + throw errMsg + } + + const channelRes = await getCameraLevel3ByStreamId(serialNo) // 或取其他服务信息 const nvrData = { - channelCount: 8, + channelCount: channelRes.length, port: 8080, + sip: nvrGbRes.sipip, } if (data.id) { @@ -57,7 +75,13 @@ async function get (ctx) { }, order: [ [orderBy || 'id', orderDirection || 'DESC'] - ] + ], + include: [{ + model: models.GbCamera, + as: 'gbNvr', + // attributes: ['id', 'address', 'name', 'online'], + required: false + }] } if (limit) { findOption.limit = limit @@ -183,6 +207,11 @@ async function detail (ctx) { }, include: [{ model: models.Vender + }, { + model: models.GbCamera, + as: 'gbNvr', + // attributes: ['id', 'address', 'name', 'online', 'registerTime', 'updateTime'], + required: false }] }) @@ -339,9 +368,9 @@ async function nvrExport (ctx) { exportData.push(n) } - const filePath = await simpleExcelDown({ data: exportData, header, fileName: `NVR信息列表_${userId}_${moment().format('YYYYMMDDHHmmss')}` }) + const fileName = `NVR信息列表_${userId}_${moment().format('YYYYMMDDHHmmss')}` + '.csv' + const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName }) const fileData = fs.readFileSync(filePath); - let fileName = filePath.split('/').pop() ctx.status = 200; ctx.set('Content-Type', 'application/x-xls'); ctx.set('Content-disposition', 'attachment; filename=' + encodeURI(fileName)); diff --git a/code/VideoAccess-VCMP/api/app/lib/index.js b/code/VideoAccess-VCMP/api/app/lib/index.js index 1cc982d..cd19130 100644 --- a/code/VideoAccess-VCMP/api/app/lib/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/index.js @@ -39,6 +39,7 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq require('./models/camera_ability')(dc); require('./models/camera_kind')(dc); require('./models/camera')(dc); + require('./models/camera_ability_bind')(dc); require('./models/nvr')(dc); require('./models/vender')(dc); require('./models/secret_yingshi')(dc); diff --git a/code/VideoAccess-VCMP/api/app/lib/models/camera.js b/code/VideoAccess-VCMP/api/app/lib/models/camera.js index ab32d09..fcbe158 100644 --- a/code/VideoAccess-VCMP/api/app/lib/models/camera.js +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera.js @@ -234,19 +234,6 @@ module.exports = dc => { model: "cameraKind" } }, - abilityId: { - type: DataTypes.INTEGER, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "ability_id", - autoIncrement: false, - references: { - key: "id", - model: "cameraAbility" - } - }, yingshiSecretId: { type: DataTypes.INTEGER, allowNull: true, @@ -271,9 +258,5 @@ module.exports = dc => { Camera.belongsTo(CameraKind, { foreignKey: 'kindId', targetKey: 'id' }); CameraKind.hasMany(Camera, { foreignKey: 'kindId', sourceKey: 'id' }); - const CameraAbility = dc.models.CameraAbility; - Camera.belongsTo(CameraAbility, { foreignKey: 'abilityId', targetKey: 'id' }); - CameraAbility.hasMany(Camera, { foreignKey: 'abilityId', sourceKey: 'id' }); - return Camera; }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/camera_ability.js b/code/VideoAccess-VCMP/api/app/lib/models/camera_ability.js index 6e572f9..bc12417 100644 --- a/code/VideoAccess-VCMP/api/app/lib/models/camera_ability.js +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera_ability.js @@ -2,33 +2,33 @@ 'use strict'; module.exports = dc => { - const DataTypes = dc.ORM; - const sequelize = dc.orm; - const CameraAbility = sequelize.define("cameraAbility", { - id: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: true, - field: "id", - autoIncrement: false, - unique: "camera_ability_id_uindex" - }, - ability: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "ability", - autoIncrement: false - } - }, { - tableName: "camera_ability", - comment: "", - indexes: [] - }); - dc.models.CameraAbility = CameraAbility; - return CameraAbility; + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const CameraAbility = sequelize.define("cameraAbility", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: false, + unique: "camera_ability_id_uindex" + }, + ability: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "ability", + autoIncrement: false + } + }, { + tableName: "camera_ability", + comment: "", + indexes: [] + }); + dc.models.CameraAbility = CameraAbility; + return CameraAbility; }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/camera_ability_bind.js b/code/VideoAccess-VCMP/api/app/lib/models/camera_ability_bind.js new file mode 100644 index 0000000..e8f46be --- /dev/null +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera_ability_bind.js @@ -0,0 +1,56 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const CameraAbilityBind = sequelize.define("cameraAbilityBind", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "camera_ability_bind_id_uindex" + }, + cameraId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "camera_id", + autoIncrement: false, + references: { + key: "id", + model: "camera" + } + }, + abilityId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "ability_id", + autoIncrement: false, + references: { + key: "id", + model: "cameraAbility" + } + } + }, { + tableName: "camera_ability_bind", + comment: "", + indexes: [] + }); + dc.models.CameraAbilityBind = CameraAbilityBind; + + const Camera = dc.models.Camera; + const CameraAbility = dc.models.CameraAbility; + Camera.belongsToMany(CameraAbility, { through: CameraAbilityBind, foreignKey: 'cameraId', otherKey: 'abilityId' }); + + return CameraAbilityBind; +}; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/gb_camera.js b/code/VideoAccess-VCMP/api/app/lib/models/gb_camera.js index 7625deb..f4ea183 100644 --- a/code/VideoAccess-VCMP/api/app/lib/models/gb_camera.js +++ b/code/VideoAccess-VCMP/api/app/lib/models/gb_camera.js @@ -2,141 +2,146 @@ 'use strict'; module.exports = dc => { - const DataTypes = dc.ORM; - const sequelize = dc.orm; - const GbCamera = sequelize.define("gbCamera", { - id: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: true, - field: "id", - autoIncrement: true, - unique: "gbcamera_id_uindex" - }, - level: { - type: DataTypes.INTEGER, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "level", - autoIncrement: false - }, - parent: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "parent", - autoIncrement: false - }, - streamid: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "streamid", - autoIncrement: false - }, - registerTime: { - type: DataTypes.DATEONLY, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "registerTime", - autoIncrement: false - }, - updateTime: { - type: DataTypes.DATEONLY, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "updateTime", - autoIncrement: false - }, - online: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "online", - autoIncrement: false - }, - manufactuer: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "manufactuer", - autoIncrement: false - }, - model: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "model", - autoIncrement: false - }, - civilCode: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "civilCode", - autoIncrement: false - }, - adddress: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "adddress", - autoIncrement: false - }, - name: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "name", - autoIncrement: false - }, - addr: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "Addr", - autoIncrement: false - }, - sipip: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "Sipip", - autoIncrement: false - } - }, { - tableName: "gbCamera", - comment: "", - indexes: [] - }); - dc.models.GbCamera = GbCamera; - return GbCamera; + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const GbCamera = sequelize.define("gbCamera", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "gbcamera_id_uindex" + }, + level: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "level", + autoIncrement: false + }, + parent: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "parent", + autoIncrement: false + }, + streamid: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "streamid", + autoIncrement: false + }, + registerTime: { + type: DataTypes.DATEONLY, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "registerTime", + autoIncrement: false + }, + updateTime: { + type: DataTypes.DATEONLY, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "updateTime", + autoIncrement: false + }, + online: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "online", + autoIncrement: false + }, + manufactuer: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "manufactuer", + autoIncrement: false + }, + model: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "model", + autoIncrement: false + }, + civilCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "civilCode", + autoIncrement: false + }, + adddress: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "adddress", + autoIncrement: false + }, + name: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "name", + autoIncrement: false + }, + addr: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "Addr", + autoIncrement: false + }, + sipip: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "Sipip", + autoIncrement: false + } + }, { + tableName: "gbCamera", + comment: "", + indexes: [] + }); + dc.models.GbCamera = GbCamera; + + const Nvr = dc.models.Nvr; + Nvr.belongsTo(GbCamera, { foreignKey: 'serialNo', targetKey: 'streamid', as: 'gbNvr' }); + GbCamera.hasMany(Nvr, { foreignKey: 'serialNo', sourceKey: 'streamid', as: 'gbNvr' }); + + return GbCamera; }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/nvr.js b/code/VideoAccess-VCMP/api/app/lib/models/nvr.js index 8caf2d1..1086433 100644 --- a/code/VideoAccess-VCMP/api/app/lib/models/nvr.js +++ b/code/VideoAccess-VCMP/api/app/lib/models/nvr.js @@ -2,127 +2,127 @@ 'use strict'; module.exports = dc => { - const DataTypes = dc.ORM; - const sequelize = dc.orm; - const Nvr = sequelize.define("nvr", { - id: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: true, - field: "id", - autoIncrement: true, - unique: "nvr_id_uindex" - }, - name: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "name", - autoIncrement: false - }, - venderId: { - type: DataTypes.INTEGER, - allowNull: true, - defaultValue: null, - comment: "设备厂家id", - primaryKey: false, - field: "vender_id", - autoIncrement: false, - references: { - key: "id", - model: "vender" + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Nvr = sequelize.define("nvr", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "nvr_id_uindex" + }, + name: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "name", + autoIncrement: false + }, + venderId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: "设备厂家id", + primaryKey: false, + field: "vender_id", + autoIncrement: false, + references: { + key: "id", + model: "vender" + } + }, + serialNo: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: "设备编号", + primaryKey: false, + field: "serial_no", + autoIncrement: false + }, + regionCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "行政区码", + primaryKey: false, + field: "region_code", + autoIncrement: false + }, + longitude: { + type: DataTypes.DOUBLE, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "longitude", + autoIncrement: false + }, + latitude: { + type: DataTypes.DOUBLE, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "latitude", + autoIncrement: false + }, + createTime: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: sequelize.fn('now'), + comment: "创建时间", + primaryKey: false, + field: "create_time", + autoIncrement: false + }, + channelCount: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: "通道数", + primaryKey: false, + field: "channel_count", + autoIncrement: false + }, + port: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "端口", + primaryKey: false, + field: "port", + autoIncrement: false + }, + delete: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "delete", + autoIncrement: false + }, + createUserId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "create_user_id", + autoIncrement: false } - }, - serialNo: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: "设备编号", - primaryKey: false, - field: "serial_no", - autoIncrement: false - }, - regionCode: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "行政区码", - primaryKey: false, - field: "region_code", - autoIncrement: false - }, - longitude: { - type: DataTypes.DOUBLE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "longitude", - autoIncrement: false - }, - latitude: { - type: DataTypes.DOUBLE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "latitude", - autoIncrement: false - }, - createTime: { - type: DataTypes.DATE, - allowNull: false, - defaultValue: sequelize.fn('now'), - comment: "创建时间", - primaryKey: false, - field: "create_time", - autoIncrement: false - }, - channelCount: { - type: DataTypes.INTEGER, - allowNull: true, - defaultValue: null, - comment: "通道数", - primaryKey: false, - field: "channel_count", - autoIncrement: false - }, - port: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "端口", - primaryKey: false, - field: "port", - autoIncrement: false - }, - delete: { - type: DataTypes.BOOLEAN, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "delete", - autoIncrement: false - }, - createUserId: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "create_user_id", - autoIncrement: false - } - }, { - tableName: "nvr", - comment: "", - indexes: [] - }); - dc.models.Nvr = Nvr; - return Nvr; + }, { + tableName: "nvr", + comment: "", + indexes: [] + }); + dc.models.Nvr = Nvr; + return Nvr; }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/utils/xlsxDownload.js b/code/VideoAccess-VCMP/api/app/lib/utils/xlsxDownload.js index 614a669..266e64a 100644 --- a/code/VideoAccess-VCMP/api/app/lib/utils/xlsxDownload.js +++ b/code/VideoAccess-VCMP/api/app/lib/utils/xlsxDownload.js @@ -64,7 +64,7 @@ module.exports = function (app, opts) { } } - const savePath = path.join(fileDirPath, fileName + '.xlsx') + const savePath = path.join(fileDirPath, fileName) await new Promise(function (resolve, reject) { file.saveAs() .pipe(fs.createWriteStream(savePath)) diff --git a/code/VideoAccess-VCMP/api/sequelize-automate.config.js b/code/VideoAccess-VCMP/api/sequelize-automate.config.js index b5dc123..185e650 100644 --- a/code/VideoAccess-VCMP/api/sequelize-automate.config.js +++ b/code/VideoAccess-VCMP/api/sequelize-automate.config.js @@ -26,7 +26,7 @@ module.exports = { dir: './app/lib/models', // 指定输出 models 文件的目录 typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义 emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` - tables: ['gbCamera'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 + tables: ['camera_ability_bind'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中 ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面 diff --git a/code/VideoAccess-VCMP/web/client/assets/images/background/building.jpg b/code/VideoAccess-VCMP/web/client/assets/images/background/building.jpg new file mode 100644 index 0000000000000000000000000000000000000000..57a72829364f1a644435e52d9fad6e87c31cba24 GIT binary patch literal 12860 zcmd^lcU03&)_)LD1oaUSP!P~ilu#liRKWs-UP2NgT?inA9zt(ERyxuAi&BM0yvbN&R7YcHcd_XV32Y{`s4nlT2nl_ujepJ9qBP{m${=@n^s#WvCJqKtVwP zP(1knjwb5P%x+_j0@ppp$b#Te$%!0H;ryO@DwXZ7gs&dr2_Z)=|LN z)Xv0A0BvUjb~UyK3kuu;1Mc2)wKqmvnc;4jm_4zyl?JX=)c|i;no0vv5VbpM_OfOc zmWu9JGq}4t0_|>vmM{h0leux%RnpbQ-o^}Pe8bho+SXChRT}t{x#UUxM>80B<0k}X zB@KM=L+Xu3YMM7>?XYGyAOd&z(RW1e+z=HM5EK>>6BFaRA#_LZ4)~4`SWt*xP)t%- zNb=5|8@~(iL>kuATvAI8`dik?KWX4^rCeNG1YCp#?66P3f)WxEKX?cU@t+|09o=kk z#;*LfjvRk+kTY{cV=e7*mUgx`esDB4v2(&n15ZZ!O9dNyHMPGn{+HIWvH79bPqZUW z%k1yN_?Ku$gqyt?Sj)`O&IyY)JArfjMSNnre=q0<@MJWS8d%Gdhhl6kXNPvOF|)-f z$w>oGdIU@@O(o?7<)LyS4@4f^5f_#h6cm&Y7JT^Np%~F8c2eNX) z4@5=fB?RR}1qI~=A3VGxA})GDC?_lSKvZ7zFIpvAN1U-O+Uzg6mM3z5)5`r@T1i=~ znK8}|i?Fk^{%ZzkTG-+294+kZZ^*(SH&B+grgkolKOW96UFFQMmd<9TP^_KJji1() zwEP#+C7`0hBEkJ{b)7$JF>A zQ{}Iwllk|f`nQRH^5<`^V`h8eFW3{uI35AW0?txVouN8?_6*e->a%C5Y3OKa&Yh!S z_~X)fx~mM#*RC>LWny8wb(4jaiyz$U_x=0nwsVu z%@tbOE1>IFuY>;Ua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=l;r%Ahnz4 zc+Ve|B#s-M*;ux=hLr>^>&856qb^eEy}0a<&5RBR@|1aY|38}!|AfklsC{}`OqL6{ z1S>PVyVdpN>YS~Mi7xlfSXm``64%0!c3V<@lA1*XH?-kR1~7%xDenTHHeXusx$ zS2~@H;xV5isJqBZN*~(BFPiR33{KBr)>Amdf#`F7tz8u7&HyOsJc`q61ukEa%M6m7 zm{6C$!x)egRry+8Na`taX(%Yi5bpf(b=43@Ik5F2N2c6zd2(CzJ0bgaRynmWrqsdd z77!EG;td%!1VYATU!Kbg+Sfe>G=f;D*ur|$eTM^kYeMv_JRh4ks5od`X;+ZvU<+s% z0KQogDBeUC^pedIIGjQcl*(A{H=T--&Nq<=R)DyiT$@ua{Amu#`cVqS9wNEv9RvlF z?rz@nlnGuy6jm60_*g1GoHrh*j@)80@q5=0Xl@^m&5lG)Y4VQ7{BI5ZLnI@SX9&)i z+6Qxts>ptc*+?-CufBGfxkNSJ7{pC?FxuMQpvn^_s={0dO^utb#jl6ckKK-0d!0Eg zebY+mVN9d}zoc!rN9=)qR_D|VSIPXQJO*FljK{ChUj-ro)QU{@fJa$rukr*g;<=l~ zaifok#V{gqQKIjCV5m@%uqn-%aIRN#>NDE%xt;V)NWQFK1LfjSHopYLia{J7Pe@#= z3fyp!7=a5$$U%u)Sx+Gz@@lo$ApFaoIUR!oRx(q#KYL^tD=m7&h)!+t9d~c#_=O5< ziodU zP?@Bq$bE}CrUj(U!K9rPKwE*t_N__{JbNg`6P7NAs3pJ?f_hX+8ETv8r)R-^Xf6 zq69eg_!sXh)&B=0{UhmmyVVGBJ2libQb>0}(y;&aY!}6w1<=n5E>X;?{=k<)BEp0T VmPwYw0D%rS=l|gn8O8C?{{zssYKH&- literal 0 HcmV?d00001 diff --git a/code/VideoAccess-VCMP/web/client/src/components/coming.jsx b/code/VideoAccess-VCMP/web/client/src/components/coming.jsx new file mode 100644 index 0000000..e2f7d95 --- /dev/null +++ b/code/VideoAccess-VCMP/web/client/src/components/coming.jsx @@ -0,0 +1,22 @@ +import React from "react"; + +const Coming = () => { + return ( +
+ +
+ ) +} + +export default Coming \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/components/index.js b/code/VideoAccess-VCMP/web/client/src/components/index.js index 2a11835..531e165 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/index.js +++ b/code/VideoAccess-VCMP/web/client/src/components/index.js @@ -1,6 +1,8 @@ 'use strict'; import SimpleFileDownButton from './simpleFileDownButton' +import Coming from './coming' export { - SimpleFileDownButton + SimpleFileDownButton, + Coming }; diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/index.js b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/index.js index df5ae2b..d7de3f8 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/index.js +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/index.js @@ -2,4 +2,6 @@ import Nvr from './nvr'; import Camera from './camera'; -export { Nvr,Camera }; \ No newline at end of file +import Recycle from './recycle' + +export { Nvr, Camera, Recycle }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/recycle.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/recycle.jsx new file mode 100644 index 0000000..6f30f23 --- /dev/null +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/recycle.jsx @@ -0,0 +1,18 @@ +import React from "react"; +import { connect } from "react-redux"; +import { Coming } from '$components' + +const Recycle = () => { + return ( + + ) +} + +function mapStateToProps (state) { + const { auth } = state; + return { + user: auth.user, + }; +} + +export default connect(mapStateToProps)(Recycle); \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/nav-item.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/nav-item.jsx index b1a2e46..c108d77 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/nav-item.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/nav-item.jsx @@ -2,15 +2,16 @@ import React from 'react'; import { IconCode } from '@douyinfe/semi-icons'; export function getNavItem (user, dispatch) { - return ( - [ - { - itemKey: 'equipmentWarehouse', text: '设备仓库', icon: , - items: [ - { itemKey: 'nvr', to: '/equipmentWarehouse/nvr', text: 'NVR管理' }, - { itemKey: 'camera', to: '/equipmentWarehouse/camera', text: '摄像头管理' }, - ] - }, - ] - ); + return ( + [ + { + itemKey: 'equipmentWarehouse', text: '设备仓库', icon: , + items: [ + { itemKey: 'nvr', to: '/equipmentWarehouse/nvr', text: 'NVR管理' }, + { itemKey: 'camera', to: '/equipmentWarehouse/camera', text: '摄像头管理' }, + { itemKey: 'recycle', to: '/equipmentWarehouse/recycle', text: '回收站' }, + ] + }, + ] + ); } \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/routes.js b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/routes.js index adb5808..24b503a 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/routes.js +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/routes.js @@ -1,23 +1,28 @@ 'use strict'; -import { Nvr,Camera } from './containers'; +import { Nvr, Camera, Recycle } from './containers'; export default [{ - type: 'inner', - route: { - path: '/equipmentWarehouse', - key: 'equipmentWarehouse', - breadcrumb: '设备仓库', - // 不设置 component 则面包屑禁止跳转 - childRoutes: [{ - path: '/nvr', - key: 'nvr', - component: Nvr, - breadcrumb: 'NVR管理', - },{ - path: '/camera', - key: 'camera', - component: Camera, - breadcrumb: '摄像头管理', - }] - } + type: 'inner', + route: { + path: '/equipmentWarehouse', + key: 'equipmentWarehouse', + breadcrumb: '设备仓库', + // 不设置 component 则面包屑禁止跳转 + childRoutes: [{ + path: '/nvr', + key: 'nvr', + component: Nvr, + breadcrumb: 'NVR管理', + }, { + path: '/camera', + key: 'camera', + component: Camera, + breadcrumb: '摄像头管理', + }, { + path: '/recycle', + key: 'recycle', + component: Recycle, + breadcrumb: '回收站', + }] + } }]; \ No newline at end of file