Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-skynet-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-skynet-admin
Commits
de754ce8
Commit
de754ce8
authored
Sep 28, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算方式调整
parent
bafd1f2c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
index.ts
src/components/MyVideo/track/index.ts
+9
-3
CameraService.ts
src/service/CameraService.ts
+2
-0
index.vue
src/views/sysSetting/index.vue
+0
-1
No files found.
src/components/MyVideo/track/index.ts
View file @
de754ce8
...
...
@@ -78,13 +78,19 @@ class DogTrack extends Component {
//跟踪框大小
myel
.
style
.
width
=
`
${(
value
.
x2
-
value
.
x1
)
*
this
.
defaultWidth
}
px`
myel
.
style
.
height
=
`
${(
value
.
y2
-
value
.
y1
)
*
(
this
.
defaultHeight
+
30
)}
px`
//跟踪框位置
myel
.
style
.
top
=
`
${
value
.
y1
*
this
.
defaultHeight
}
px`
myel
.
style
.
left
=
`
${
value
.
x1
*
this
.
defaultWidth
}
px`
console
.
log
(
`top:
${
myel
.
style
.
top
}
,left:
${
myel
.
style
.
left
}
,screen-width:
${
this
.
defaultWidth
}
,screen-height:
${
this
.
defaultHeight
}
,dogs:
${
JSON
.
stringify
(
value
)}
`
)
}
else
{
myel
.
style
.
width
=
`
${(
value
.
x2
-
value
.
x1
)
*
this
.
fullWidth
}
px`
myel
.
style
.
height
=
`
${(
value
.
y2
-
value
.
y1
)
*
(
this
.
fullHeight
+
30
)}
px`
}
//跟踪框位置
myel
.
style
.
top
=
`
${
value
.
y1
*
100
}
%`
myel
.
style
.
left
=
`
${
value
.
x1
*
100
}
%`
myel
.
style
.
top
=
`
${
value
.
y1
*
this
.
fullHeight
}
px`
myel
.
style
.
left
=
`
${
value
.
x1
*
this
.
fullWidth
}
px`
// console.log(`top:${myel.style.top},left:${myel.style.left},screen-width:${this.defaultWidth},screen-height:${this.defaultHeight},dogs:${dogs}`)
}
myel
.
className
=
myel
.
className
.
replace
(
/display-none/ig
,
""
)
}
//清理掉当前frame没有的dog追踪
...
...
src/service/CameraService.ts
View file @
de754ce8
...
...
@@ -67,6 +67,7 @@ export function getLabelInfo(fileName: string) {
*/
export
function
convertLabelInfo
(
data
:
TrackData
[])
{
if
(
!
data
||
data
.
length
===
0
)
return
[]
const
now
=
new
Date
().
getTime
()
const
trackData
=
new
Map
();
const
dogIds
=
new
Map
()
data
.
forEach
((
frame
:
TrackData
)
=>
{
...
...
@@ -76,5 +77,6 @@ export function convertLabelInfo(data: TrackData[]) {
trackData
.
set
(
frame
.
FrameIndex
,
m
)
dogIds
.
set
(
frame
.
DogId
,
frame
.
FrameIndex
)
});
console
.
log
(
`标识文件大小:
${
data
.
length
}
行,处理耗时:
${
new
Date
().
getTime
()
-
now
}
毫秒`
)
return
[
dogIds
,
trackData
]
}
\ No newline at end of file
src/views/sysSetting/index.vue
View file @
de754ce8
...
...
@@ -220,7 +220,6 @@ export default class SysSetting extends BaseVue {
}
async
handleQuery
(
data
:
any
):
Promise
<
void
>
{
console
.
log
(
"
query
"
,
data
);
this
.
isDisabled
=
true
;
this
.
queryData
=
{
...
this
.
queryData
,
...
data
};
await
this
.
queryCamera
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment