diff --git a/code/VideoAccess-VCMP/api/app/lib/index.js b/code/VideoAccess-VCMP/api/app/lib/index.js index df16b42..0fd17b8 100644 --- a/code/VideoAccess-VCMP/api/app/lib/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/index.js @@ -20,17 +20,9 @@ module.exports.entry = function (app, router, opts) { }; module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} } - require('./models/user')(dc); - require('./models/user_token')(dc); - require('./models/department')(dc); - require('./models/resource')(dc); - require('./models/user_resource')(dc); - require('./models/places')(dc); - require('./models/user_placeSecurityRecord')(dc); - require('./models/report_type')(dc); - require('./models/report_downManage')(dc); - require('./models/department')(dc); - require('./models/report_configition')(dc); - require('./models/report_collection')(dc); - require('./models/report_rectify')(dc); + require('./models/camera_ability')(dc); + require('./models/camera_kind')(dc); + require('./models/camera')(dc); + require('./models/nvr')(dc); + require('./models/vender')(dc); }; diff --git a/code/VideoAccess-VCMP/api/app/lib/models/camera.js b/code/VideoAccess-VCMP/api/app/lib/models/camera.js new file mode 100644 index 0000000..233e2e4 --- /dev/null +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera.js @@ -0,0 +1,257 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Camera = sequelize.define("camera", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "camera_id_uindex" + }, + type: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: "设备类型:yingshi - 萤石;nvr - NVR摄像头;ipc - IPC 网络摄像头;cascade - 级联摄像头", + primaryKey: false, + field: "type", + autoIncrement: false + }, + name: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "设备名称/安装位置", + primaryKey: false, + field: "name", + autoIncrement: false + }, + channelName: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "通道名称", + primaryKey: false, + field: "channel_name", + autoIncrement: false + }, + externalDomain: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "外域名称", + primaryKey: false, + field: "external_domain", + autoIncrement: false + }, + rtmp: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "rtmp", + autoIncrement: false + }, + serialNo: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "设备编号", + primaryKey: false, + field: "serial_no", + autoIncrement: false + }, + cloudControl: { + type: DataTypes.BOOLEAN, + allowNull: true, + defaultValue: null, + comment: "云台控制", + primaryKey: false, + field: "cloud_control", + autoIncrement: false + }, + highDefinition: { + type: DataTypes.BOOLEAN, + allowNull: true, + defaultValue: null, + comment: "高清支持", + primaryKey: false, + field: "high_definition", + autoIncrement: false + }, + voice: { + type: DataTypes.BOOLEAN, + allowNull: true, + defaultValue: null, + comment: "语音对讲支持", + primaryKey: false, + field: "voice", + autoIncrement: false + }, + memoryCard: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "内存卡容量", + primaryKey: false, + field: "memory_card", + autoIncrement: false + }, + venderId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: "设备厂商id", + primaryKey: false, + field: "vender_id", + autoIncrement: false, + references: { + key: "id", + model: "vender" + } + }, + cascadeType: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "级联方式:up - 上级联;down - 下级联", + primaryKey: false, + field: "cascade_type", + autoIncrement: false + }, + sip: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "sip", + autoIncrement: false + }, + longitude: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + comment: "经度", + primaryKey: false, + field: "longitude", + autoIncrement: false + }, + latitude: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + comment: "维度", + primaryKey: false, + field: "latitude", + autoIncrement: false + }, + forbidden: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: null, + comment: "是否禁用", + primaryKey: false, + field: "forbidden", + autoIncrement: false + }, + createTime: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "create_time", + autoIncrement: false + }, + recycleTime: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: null, + comment: "放入回收站时间", + primaryKey: false, + field: "recycle_time", + autoIncrement: false + }, + delete: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: null, + comment: "是否彻底删除", + primaryKey: false, + field: "delete", + autoIncrement: false + }, + createUserId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "create_user_id", + autoIncrement: false + }, + nvrId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "nvr_id", + autoIncrement: false, + references: { + key: "id", + model: "nvr" + } + }, + model: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "型号", + primaryKey: false, + field: "model", + autoIncrement: false + }, + kindId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "kind_id", + autoIncrement: false, + references: { + key: "id", + model: "cameraKind" + } + }, + abilityId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "ability_id", + autoIncrement: false, + references: { + key: "id", + model: "cameraAbility" + } + } + }, { + tableName: "camera", + comment: "", + indexes: [] + }); + dc.models.Camera = Camera; + 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 new file mode 100644 index 0000000..6e572f9 --- /dev/null +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera_ability.js @@ -0,0 +1,34 @@ +/* eslint-disable*/ +'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; +}; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/camera_kind.js b/code/VideoAccess-VCMP/api/app/lib/models/camera_kind.js new file mode 100644 index 0000000..1b76260 --- /dev/null +++ b/code/VideoAccess-VCMP/api/app/lib/models/camera_kind.js @@ -0,0 +1,34 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const CameraKind = sequelize.define("cameraKind", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: false, + unique: "camera_kind_id_uindex" + }, + kind: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "kind", + autoIncrement: false + } + }, { + tableName: "camera_kind", + comment: "", + indexes: [] + }); + dc.models.CameraKind = CameraKind; + return CameraKind; +}; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/user.js b/code/VideoAccess-VCMP/api/app/lib/models/nvr.js similarity index 58% rename from code/VideoAccess-VCMP/api/app/lib/models/user.js rename to code/VideoAccess-VCMP/api/app/lib/models/nvr.js index 683ccaf..8caf2d1 100644 --- a/code/VideoAccess-VCMP/api/app/lib/models/user.js +++ b/code/VideoAccess-VCMP/api/app/lib/models/nvr.js @@ -4,7 +4,7 @@ module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; - const User = sequelize.define("user", { + const Nvr = sequelize.define("nvr", { id: { type: DataTypes.INTEGER, allowNull: false, @@ -13,7 +13,7 @@ module.exports = dc => { primaryKey: true, field: "id", autoIncrement: true, - unique: "user_id_uindex" + unique: "nvr_id_uindex" }, name: { type: DataTypes.STRING, @@ -24,49 +24,80 @@ module.exports = dc => { field: "name", autoIncrement: false }, - username: { + 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: "用户名 账号", + comment: "设备编号", primaryKey: false, - field: "username", + field: "serial_no", autoIncrement: false }, - password: { + 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: "password", + field: "longitude", autoIncrement: false }, - departmentId: { - type: DataTypes.INTEGER, + latitude: { + type: DataTypes.DOUBLE, allowNull: false, defaultValue: null, - comment: "部门id", + comment: null, primaryKey: false, - field: "department_id", + field: "latitude", autoIncrement: false }, - email: { - type: DataTypes.STRING, + 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: null, + comment: "通道数", primaryKey: false, - field: "email", + field: "channel_count", autoIncrement: false }, - enable: { - type: DataTypes.BOOLEAN, - allowNull: false, + port: { + type: DataTypes.STRING, + allowNull: true, defaultValue: null, - comment: "启用状态", + comment: "端口", primaryKey: false, - field: "enable", + field: "port", autoIncrement: false }, delete: { @@ -78,31 +109,20 @@ module.exports = dc => { field: "delete", autoIncrement: false }, - phone: { - type: DataTypes.STRING, + createUserId: { + type: DataTypes.INTEGER, allowNull: false, defaultValue: null, - comment: "手机号(小程序使用手机号登录)", - primaryKey: false, - field: "phone", - autoIncrement: false - }, - post: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "职位", + comment: null, primaryKey: false, - field: "post", + field: "create_user_id", autoIncrement: false } }, { - tableName: "user", + tableName: "nvr", comment: "", indexes: [] }); - dc.models.User = User; - - - return User; + dc.models.Nvr = Nvr; + return Nvr; }; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/app/lib/models/vender.js b/code/VideoAccess-VCMP/api/app/lib/models/vender.js new file mode 100644 index 0000000..92e5474 --- /dev/null +++ b/code/VideoAccess-VCMP/api/app/lib/models/vender.js @@ -0,0 +1,34 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Vender = sequelize.define("vender", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "vender_id_uindex" + }, + name: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "name", + autoIncrement: false + } + }, { + tableName: "vender", + comment: "", + indexes: [] + }); + dc.models.Vender = Vender; + return Vender; +}; \ No newline at end of file diff --git a/code/VideoAccess-VCMP/api/sequelize-automate.config.js b/code/VideoAccess-VCMP/api/sequelize-automate.config.js index a0fb179..dde9092 100644 --- a/code/VideoAccess-VCMP/api/sequelize-automate.config.js +++ b/code/VideoAccess-VCMP/api/sequelize-automate.config.js @@ -1,7 +1,7 @@ module.exports = { // 数据库配置 与 sequelize 相同 dbOptions: { - database: 'yinjiguanli', + database: 'video_access', username: 'postgres', password: '123', dialect: 'postgres', @@ -25,9 +25,9 @@ module.exports = { fileNameCamelCase: false, // Model 文件名是否使用驼峰法命名,默认文件名会使用表名,如 `user_post.js`;如果为 true,则文件名为 `userPost.js` dir: './app/lib/models', // 指定输出 models 文件的目录 typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义 - emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` - tables: ['user_placeSecurityRecord', 'places'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 - skipTables: ['user'], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 + emptyDir: true, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` + tables: null, // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 + skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中 ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面 attrLength: false, // 在生成模型的字段中 是否生成 如 var(128)这种格式,公司一般使用 String ,则配置为 false diff --git a/code/VideoAccess-VCMP/web/client/assets/images/background/location.png b/code/VideoAccess-VCMP/web/client/assets/images/background/location.png new file mode 100644 index 0000000..233c472 Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/images/background/location.png differ diff --git a/code/VideoAccess-VCMP/web/client/assets/video/camera_banner.mp4 b/code/VideoAccess-VCMP/web/client/assets/video/camera_banner.mp4 new file mode 100644 index 0000000..4c3960e Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/video/camera_banner.mp4 differ diff --git a/code/VideoAccess-VCMP/web/client/assets/video/nvr_banner.mp4 b/code/VideoAccess-VCMP/web/client/assets/video/nvr_banner.mp4 new file mode 100644 index 0000000..fa0a082 Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/video/nvr_banner.mp4 differ diff --git a/code/VideoAccess-VCMP/web/client/assets/video/recycle_banner.mp4 b/code/VideoAccess-VCMP/web/client/assets/video/recycle_banner.mp4 new file mode 100644 index 0000000..0dc7d39 Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/video/recycle_banner.mp4 differ diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx index e69de29..0105cdb 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/nvrModal.jsx @@ -0,0 +1,112 @@ +import React, { useState } from 'react' +import { Modal, Button,Form,Row,Col,Divider,Spin } from '@douyinfe/semi-ui'; +import { IconTickCircle } from '@douyinfe/semi-icons'; +function nvrModal(props){ + const [visible, setVisible] = useState(false);//是否显示弹框 + const [isloading,setloading] = useState(false);//是否显示loading + const [loadingTip,setloadingTip] = useState('获取中...请稍后...');//loading tip的值 + const [step,setstep] = useState(0) + function showDialog() {//打开弹框 + setVisible(true); + } + function handleOk() {//点击弹框确定 + // setVisible(false); + setloading(true); + setTimeout(() => { + setloadingTip('...接受成功') + setTimeout(()=>{ + setloadingTip('已完成') + setTimeout(() => { + setstep(1); + setloading(false); + }, 2000); + },2000) + }, 2000); + } + function handleAfterClose(){//在关闭之后 + console.log('after'); + } + function handleCancel() {//点击弹框取消 + setVisible(false); + } + return ( + <> +