Browse Source

登出、配置

release_0.0.2
巴林闲侠 3 years ago
parent
commit
a15fb7be51
  1. 30
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  2. 7
      code/VideoAccess-VCMP/web/client/src/components/videoPlay.jsx
  3. 2
      code/VideoAccess-VCMP/web/client/src/layout/index.jsx
  4. 2
      code/VideoAccess-VCMP/web/client/src/sections/auth/actions/auth.js
  5. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx
  6. 2
      code/VideoAccess-VCMP/web/package.json

30
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -22,9 +22,13 @@ async function getCameraProject (ctx, next) {
model: models.CameraKind
}, {
model: models.Nvr,
where: nvrId ? {
id: nvrId
} : {},
required: Boolean(nvrId),
attributes: ['id', 'name', 'serialNo']
}]
}],
distinct: true
}
let abilityFind = {
model: models.CameraAbility
@ -36,14 +40,15 @@ async function getCameraProject (ctx, next) {
findOption.offset = page * limit
}
if (keyword) {
findOption.where.$or = [
{
name: { $like: `%${keyword}%` }
},
findOption.where.name = { $like: `%${keyword}%` }
// findOption.where.$or = [
// {
// serialNo: { $like: `%${keyword}%` }
// }
]
// name: { $like: `%${keyword}%` }
// },
// // {
// // serialNo: { $like: `%${keyword}%` }
// // }
// ]
}
if (type) {
findOption.where.type = type
@ -62,9 +67,12 @@ async function getCameraProject (ctx, next) {
findOption.include.push(abilityFind)
const cameraRes = await models.Camera.findAll(findOption)
const total = await models.Camera.count({
where: findOption.where
})
delete findOption.order
delete findOption.limit
delete findOption.offset
delete findOption.attributes
const total = await models.Camera.count(findOption)
let cameraIds = []
let createUserIds = new Set()

7
code/VideoAccess-VCMP/web/client/src/components/videoPlay.jsx

@ -12,7 +12,12 @@ const VideoPlay = ({ height, width }) => {
const [operationState, setoperationState] = useState()
const operation = [{
key: 'control',
click: () => { console.log(121212); }
click: () => {
console.log(object);
const nextOperationState = JSON.parse(JSON.stringify(operationState))
nextOperationState['control'].select = !nextOperationState['control'].select
setoperationState(nextOperationState)
}
}, {
key: 'talk',
click: () => { console.log(121212); }

2
code/VideoAccess-VCMP/web/client/src/layout/index.jsx

@ -163,7 +163,7 @@ const Root = props => {
setAuthCrossLoading(false)
});
setAuthCrossLoading(false)
// setAuthCrossLoading(false)
}, [])
return (

2
code/VideoAccess-VCMP/web/client/src/sections/auth/actions/auth.js

@ -64,7 +64,7 @@ export function login (username, password) {
export const LOGOUT = 'LOGOUT';
export function logout () {
const user = JSON.parse(sessionStorage.getItem('user'))
AxyRequest.put(ApiTable.logout, {
AxyRequest.post(ApiTable.logout, {
token: user.token
});
sessionStorage.removeItem('user');

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -699,7 +699,7 @@ const CameraHeader = (props) => {
""
)}
{
// <VideoPlayModal visible={true} />
<VideoPlayModal visible={true} />
}
</>
);

2
code/VideoAccess-VCMP/web/package.json

@ -7,7 +7,7 @@
"test": "mocha",
"start-vite": "cross-env NODE_ENV=developmentVite npm run start-params",
"start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://10.8.30.7:4000 --apiAuthUrl http://10.8.30.7:4200 --apiAnxinyunUrl http://10.8.30.7:4100 --iotAuthWeb http://10.8.30.7:5200",
"start-params": "node server -p 5000 -u http://10.8.30.7:4000 --apiAuthUrl http://10.8.30.7:4200 --apiAnxinyunUrl http://10.8.30.7:4100 --iotAuthWeb http://localhost:5200",
"deploy": "export NODE_ENV=production&& npm run build && node server",
"build-dev": "cross-env NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js"

Loading…
Cancel
Save