Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e9b878f7
authored
May 25, 2021
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【BUG】修改密码验证方式
【new】增加用户显示,增加推出提示 【new】过车增加速度
1 parent
af680df9
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
701 deletions
public/index.html
public/js/version.json
src/api/baseUrl.js
src/api/log.js
src/assets/js/buildcodes.js
src/assets/resetElementCss/index.scss
src/views/Layout/index.vue
src/views/Resetpassword.vue
src/views/ops/user_manage.vue
src/views/sceneManage/setting/areaconfig/Behavior的副本.vue
src/views/search/vehicleSearch.vue
public/index.html
View file @
e9b878f
...
...
@@ -4,6 +4,9 @@
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
http-equiv=
"Cache-Control"
content=
"no-cache, no-store, must-revalidate"
/>
<meta
http-equiv=
"Pragma"
content=
"no-cache"
/>
<meta
http-equiv=
"Expires"
content=
"0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.png"
>
<link
rel=
"stylesheet"
href=
"<%= BASE_URL %>zTree_v3/css/zTreeStyle/zTreeStyle.css"
></link>
<title>
AI视频分析平台
</title>
...
...
public/js/version.json
View file @
e9b878f
{
"commit"
:
"633f7a4d90b06cfc5d2a4809638b6778756ea0f5"
,
"commitDate"
:
"2021-5-20 11:5"
,
"buildDate"
:
"2021-5-20 16:29"
,
"version"
:
"2.1.0"
,
"info"
:
"tijioa"
}
\ No newline at end of file
{
"commit"
:
"af680df9280d84c026e7ce21c2b21559ea924789"
,
"commitDate"
:
"2021-5-20 16:58"
,
"buildDate"
:
"2021-5-21 17:24"
,
"version"
:
"2.1.0"
,
"info"
:
"提交博关算法配置"
}
\ No newline at end of file
src/api/baseUrl.js
View file @
e9b878f
...
...
@@ -4,7 +4,7 @@ import axios from "axios";
switch
(
process
.
env
.
NODE_ENV
)
{
case
"development"
:
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.233:20070"
:
"http://192.168.9.
17
3:20080"
;
// 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.233:20070"
:
"http://192.168.9.
23
3:20080"
;
// 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
...
...
src/api/log.js
View file @
e9b878f
...
...
@@ -15,7 +15,6 @@ let servicename = {
const
oplogs
=
function
(
data
,
service
,
action
)
{
//开启日志模式才进行日志收集
if
(
window
.
config
.
logstatus
)
{
debugger
let
username
=
localStorage
.
getItem
(
'uname'
);
let
baseData
=
{
"dt"
:
moment
().
locale
(
'zh-cn'
),
...
...
src/assets/js/buildcodes.js
View file @
e9b878f
...
...
@@ -226,6 +226,7 @@ class Codes {
}
catch
(
e
)
{
// console.log("遮阳板无");
}
if
(
ary
.
length
)
{
this
.
result
.
RefinedFeature_text
=
ary
.
join
(
""
);
}
else
{
...
...
src/assets/resetElementCss/index.scss
View file @
e9b878f
...
...
@@ -286,6 +286,7 @@ display: table-cell!important;
}
.el-form-item--mini.el-form-item
,
.el-form-item--small.el-form-item
{
margin-bottom
:
4px
;
line-height
:
32px
;
}
/* 切换 */
.el-tabs__item
{
...
...
src/views/Layout/index.vue
View file @
e9b878f
...
...
@@ -23,6 +23,7 @@
<el-dropdown-item
command=
"dark"
>
深色主题
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span
class=
"uname-box"
>
{{
uname
}}
</span>
<img
@
click=
"resetpass"
src=
"../../assets/img/home/user.png"
alt=
""
/>
<span
class=
"exit"
@
click=
"logout()"
>
退出
<i
class=
"el-icon-arrow-down"
></i
...
...
@@ -67,7 +68,8 @@ export default {
menuwidth
:
"300px"
,
isfull
:
true
,
headertitle
:
""
,
topbarArr
:
[]
topbarArr
:
[],
uname
:
''
};
},
methods
:
{
...
...
@@ -148,6 +150,7 @@ export default {
logout
()
{
localStorage
.
removeItem
(
"menu"
);
localStorage
.
removeItem
(
"curmenu"
);
this
.
$store
.
commit
(
types
.
ATOKEN
,
""
);
this
.
$logs
.
oplogs
(
''
,
'serv_login'
,
`登出了平台`
);
if
(
window
.
config
.
isdd
)
{
...
...
@@ -168,6 +171,7 @@ export default {
},
created
()
{
this
.
headertitle
=
window
.
config
.
hadertitle
;
this
.
uname
=
localStorage
.
getItem
(
'uname'
);
this
.
$api
.
device
.
getDev
().
then
(
m
=>
{
if
(
m
.
length
<
1
)
{
this
.
$message
({
...
...
@@ -212,6 +216,10 @@ export default {
window
.
mousetimer
=
setTimeout
(()
=>
{
clearTimeout
(
window
.
mousetimer
);
window
.
mousetimer
=
null
;
this
.
$message
({
message
:
"由于您长时间未操作,将退出平台!"
,
type
:
"warning"
});
this
.
logout
();
},
600000
);
});
...
...
@@ -328,4 +336,7 @@ export default {
.timerbox
{
padding-right
30px
}
.uname-box
{
padding-right
:
10px
}
</
style
>
src/views/Resetpassword.vue
View file @
e9b878f
...
...
@@ -47,7 +47,7 @@ export default {
callback
(
new
Error
(
"新旧密码不能重复!"
));
return
}
var
pwdRegex
=
/^
(?=
^.
{8,}
$
)((?=
.*
\d)
|
(?=
.*
\W
+
))(?![
.
\n])(?=
.*
[
A-Z
])(?=
.*
[
a-z
])
.*$"/
;
var
pwdRegex
=
new
RegExp
(
'(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}'
)
;
if
(
!
pwdRegex
.
test
(
value
))
{
callback
(
new
Error
(
"您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"
))
}
...
...
src/views/ops/user_manage.vue
View file @
e9b878f
...
...
@@ -196,7 +196,7 @@ export default {
}
};
var
validatePass
=
(
rule
,
value
,
callback
)
=>
{
var
pwdRegex
=
/^
(?=
^.
{8,}
$
)((?=
.*
\d)
|
(?=
.*
\W
+
))(?![
.
\n])(?=
.*
[
A-Z
])(?=
.*
[
a-z
])
.*$"/
;
;
var
pwdRegex
=
new
RegExp
(
'(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}'
)
;
if
(
!
pwdRegex
.
test
(
value
))
{
callback
(
new
Error
(
"您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"
))
}
else
{
...
...
src/views/sceneManage/setting/areaconfig/Behavior的副本.vue
deleted
100644 → 0
View file @
af680df
<
template
>
<div
class=
"modal-body b-box"
>
<div
class=
"modal-left"
>
<div
class=
"pic"
id=
"pic"
>
<canvas
id=
"main"
width=
"700"
height=
"500"
></canvas>
</div>
</div>
<div
class=
"modal-right"
>
<div
class=
"be-header"
>
<el-radio-group
v-model=
"checkval"
size=
"mini"
>
<el-radio-button
label=
"shanghai"
>
行为事件
</el-radio-button>
<el-radio-button
label=
"北京"
name=
"shangha"
disabled
>
交通事件
</el-radio-button
>
<el-radio-button
label=
"广州"
name=
"shnghai"
disabled
>
安防事件
</el-radio-button
>
</el-radio-group>
</div>
<div
class=
"be-content"
>
<div
class=
"typebox"
>
<div
class=
"checkbox"
v-for=
"(item, index) in basconfig"
:key=
"index"
>
<div
:class=
"
{ listbox: true, curlist: cindex == index }"
@click="seltype(item, index)"
>
<el-checkbox-group
v-model=
"checkboxGroup1"
class=
"checkgrop"
>
<el-checkbox
:key=
"item.name"
:label=
"item.name"
>
{{
""
}}
</el-checkbox>
</el-checkbox-group>
<span
class=
"typetext"
>
{{
item
.
name
}}
</span>
</div>
</div>
</div>
<div
class=
"configbox"
>
<div
class=
"areabox"
>
<div
class=
"area-header"
>
检测规则
</div>
<div
:class=
"
{'area-item':true,'activeare':item.id==curuuid}"
v-for="(item, index) in groupList"
:key="index"
@click="changeKlass(item)"
>
区域
{{
index
+
1
}}
</div>
<div
class=
"bottombtn"
>
<!--
<el-button
@
click=
"savechange"
type=
"primary"
size=
"mini"
style=
"width:90px"
>
保存
</el-button>
-->
<!--
<el-button
@
click=
"save"
type=
"primary"
size=
"mini"
style=
"width: 90px"
>
保存
</el-button>
-->
</div>
</div>
<div
class=
"setbox"
>
<div
v-for=
"(val, key, index) in citem.config"
:key=
"index"
class=
"setboxitem"
>
<span
class=
"configlabel"
>
{{
key
}}
:
</span>
<span
class=
""
><el-input
v-model=
"citem.config[key]"
></el-input
></span>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
fabric
}
from
"fabric"
;
import
{
select
}
from
"svg.js"
;
import
{
xml
}
from
"./bog.js"
;
var
canvas
=
null
;
export
default
{
name
:
"zoneSetting"
,
props
:
[
"bgUrl"
],
data
()
{
return
{
tabPosition
:
"top"
,
checkval
:
"shanghai"
,
checkboxGroup1
:
[
"人员脱岗"
],
groupList
:
[],
curAlgoType
:
"xsdsfd"
,
basconfig
:
{},
baselist
:
{},
cindex
:
0
,
citem
:
null
,
curuuid
:
null
,
roiBody
:{},
basedocument
:
null
,
paramsData
:
""
,
};
},
methods
:
{
/**
* 初始化区域
*/
configInit
(
xml
){
},
getObjects
(
klass
)
{
//获取所有的列表对象
var
group
=
canvas
.
getObjects
();
},
setAreaconfig
()
{
var
group
=
canvas
.
getObjects
();
this
.
groupList
=
group
;
},
//设置活动对象
changeKlass
(
klass
)
{
canvas
.
setActiveObject
(
klass
);
canvas
.
requestRenderAll
();
},
updateGroup
()
{
var
group
=
canvas
.
getObjects
();
this
.
groupList
=
group
;
},
/**
* tab切换保存之前绘制的数据
*/
changetype
(
data
,
index
)
{
var
group
=
canvas
.
getObjects
();
var
confdata
=
this
.
basconfig
[
this
.
cindex
];
confdata
.
roi
=
group
;
canvas
.
clear
();
console
.
log
(
this
.
basconfig
);
},
/**
* 回显对象
*/
fabricObjInit
(
klass
)
{
canvas
.
add
(
klass
);
},
/**
* 根据选择模型定位规则
*/
selectklass
(
klass
){
this
.
curuuid
=
klass
.
id
;
},
/**
* 解构算法xml
*/
initConfig
(
config
)
{
for
(
let
key
in
config
)
{
if
(
key
===
"root"
)
{
this
.
initConfig
(
config
[
"root"
]);
}
else
if
(
key
===
"算法功能"
)
{
this
.
initConfig
(
config
[
key
]);
}
else
{
this
.
buildUserobj
(
config
[
key
],
key
);
}
}
},
/**
* 构建需要的数据结构
*/
buildUserobj
(
obj
,
parentkey
)
{
let
arr
=
[];
for
(
let
key
in
obj
)
{
let
buildobj
=
{
pkey
:
parentkey
,
id
:
key
,
name
:
key
,
roi
:
null
,
config
:
obj
[
key
],
};
arr
.
push
(
buildobj
);
}
this
.
basconfig
=
arr
;
debugger
;
this
.
citem
=
arr
[
0
];
console
.
log
(
this
.
citem
);
console
.
log
(
"baseconfgi"
,
this
.
basconfig
);
},
seltype
(
item
,
cindex
)
{
if
(
this
.
cindex
==
cindex
)
{
return
false
;
}
this
.
citem
=
item
;
this
.
changetype
(
item
);
this
.
cindex
=
cindex
;
let
rois
=
item
.
roi
;
if
(
item
.
roi
!==
""
&&
item
.
roi
!==
null
)
{
this
.
groupList
=
rois
for
(
let
i
=
0
;
i
<
rois
.
length
;
i
++
)
{
this
.
fabricObjInit
(
rois
[
i
]);
}
}
},
/**
* 修改配置文件
*/
savechange
()
{},
/**
* 构建存储用的json
*/
save
()
{
//博关算法监测区域
let
confArr
=
[],
parentname
;
this
.
basconfig
.
map
((
ele
)
=>
{
if
(
ele
.
config
[
"算法ID"
])
{
let
idname
=
ele
.
config
[
"算法ID"
];
let
ROI
=
{
idname
:
""
,
};
console
.
log
(
this
.
buildRoI
(
ele
))
this
.
roiBody
[
idname
]
=
this
.
buildRoI
(
ele
);
// confArr.push(this.buildRoI(ele));
}
//构建参数树
parentname
=
ele
.
pkey
;
let
chidkey
=
ele
.
name
;
let
childconfig
=
{};
childconfig
[
chidkey
]
=
ele
.
config
;
confArr
.
push
(
childconfig
);
});
this
.
buildParam
(
parentname
,
confArr
);
return
this
.
oParse
.
writeXML
({
roi
:
this
.
roiBody
});
},
clear
(){
canvas
.
clear
();
},
/**
* 构建ROI
*/
buildRoI
(
klass
){
let
bg_arr
=
[],
pol
;
let
idname
=
klass
.
config
[
"算法ID"
];
if
(
klass
.
roi
!=
null
&&
klass
.
roi
!=
""
)
{
klass
.
roi
.
map
(
ele
=>
{
let
lines
=
ele
.
aCoords
;
let
point
=
[{
"point_seq"
:
"1"
,
"x"
:(
lines
.
tl
.
x
/
700
).
toFixed
(
6
),
"y"
:(
lines
.
tl
.
y
/
500
).
toFixed
(
6
)
},{
"point_seq"
:
"2"
,
"x"
:(
lines
.
tr
.
x
/
700
).
toFixed
(
6
),
"y"
:(
lines
.
tr
.
y
/
500
).
toFixed
(
6
)
},{
"point_seq"
:
"3"
,
"x"
:(
lines
.
br
.
x
/
700
).
toFixed
(
6
),
"y"
:(
lines
.
br
.
y
/
500
).
toFixed
(
6
),
},{
"point_seq"
:
"4"
,
"x"
:(
lines
.
bl
.
x
/
700
).
toFixed
(
6
),
"y"
:(
lines
.
bl
.
y
/
500
).
toFixed
(
6
),
}]
let
obj
=
{
"polygon_point_count"
:
4
,
"point"
:
point
}
bg_arr
.
push
(
obj
)
});
pol
=
{
"region_count"
:
klass
.
roi
.
length
,
"polygon"
:
bg_arr
}
}
else
{
pol
=
{
"region_count"
:
0
,
}
}
return
pol
;
},
/**
* 构建参数树
*/
buildParam
(
parentname
,
confArr
)
{
let
paramsconfig
=
{
root
:
{
算法功能
:
{},
},
};
let
pobj
=
{
"结果推送地址"
:
"http://192.168.9.25:8080/"
};
confArr
.
map
((
ele
)
=>
{
for
(
key
in
ele
)
{
pobj
[
key
]
=
ele
[
key
];
}
});
paramsconfig
.
root
.
算法功能
[
parentname
]
=
pobj
;
this
.
paramsData
=
this
.
oParse
.
writeXML
(
paramsconfig
);
},
},
created
()
{
this
.
basconfig
=
this
.
oParse
.
parseXML
(
xml
);
this
.
initConfig
(
this
.
basconfig
);
},
mounted
()
{
this
.
basedocument
=
$
.
parseXML
(
xml
);
var
vthis
=
this
;
var
mouseFrom
=
{},
mouseTo
=
{},
drawType
=
""
,
canvasObjectIndex
=
0
,
textbox
=
null
;
var
drawWidth
=
2
;
//笔触宽度
var
color
=
"#E34F51"
;
//画笔颜色
var
drawingObject
=
null
;
//当前绘制对象
var
moveCount
=
1
;
//绘制移动计数器
var
doDrawing
=
false
;
// 绘制状态
var
cvselect
=
false
;
var
curObjcet
=
null
;
var
cvunselect
=
true
;
var
deleteIcon
=
"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Ebene_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='595.275px' height='595.275px' viewBox='200 215 230 470' xml:space='preserve'%3E%3Ccircle style='fill:%23F44336;' cx='299.76' cy='439.067' r='218.516'/%3E%3Cg%3E%3Crect x='267.162' y='307.978' transform='matrix(0.7071 -0.7071 0.7071 0.7071 -222.6202 340.6915)' style='fill:white;' width='65.545' height='262.18'/%3E%3Crect x='266.988' y='308.153' transform='matrix(0.7071 0.7071 -0.7071 0.7071 398.3889 -83.3116)' style='fill:white;' width='65.544' height='262.179'/%3E%3C/g%3E%3C/svg%3E"
;
var
img
=
document
.
createElement
(
"img"
);
//设置图形显示拖拽点样式
fabric
.
Object
.
prototype
.
controls
.
deleteControl
=
new
fabric
.
Control
({
x
:
0.5
,
y
:
-
0.5
,
offsetY
:
-
10
,
offsetX
:
-
30
,
cursorStyle
:
"pointer"
,
mouseUpHandler
:
deleteObject
,
render
:
renderIcon
,
cornerSize
:
16
,
});
function
deleteObject
(
eventData
,
transform
)
{
var
target
=
transform
.
target
;
var
canvas
=
target
.
canvas
;
cvselect
=
false
;
canvas
.
remove
(
target
);
canvas
.
requestRenderAll
();
}
function
renderIcon
(
ctx
,
left
,
top
,
styleOverride
,
fabricObject
)
{
var
size
=
this
.
cornerSize
;
ctx
.
save
();
ctx
.
translate
(
left
,
top
);
ctx
.
rotate
(
fabric
.
util
.
degreesToRadians
(
fabricObject
.
angle
));
ctx
.
drawImage
(
img
,
-
size
/
2
,
-
size
/
2
,
size
,
size
);
ctx
.
restore
();
}
img
.
src
=
deleteIcon
;
window
.
zoom
=
window
.
zoom
?
window
.
zoom
:
1
;
canvas
=
new
fabric
.
Canvas
(
"main"
,
{});
canvas
.
on
(
"mouse:down"
,
function
(
options
)
{
console
.
log
(
options
);
var
xy
=
transformMouse
(
options
.
e
.
offsetX
,
options
.
e
.
offsetY
);
mouseFrom
.
x
=
xy
.
x
;
mouseFrom
.
y
=
xy
.
y
;
if
(
!
cvselect
)
{
doDrawing
=
true
;
}
else
{
if
(
!
cvunselect
)
{
cvselect
=
false
;
}
}
});
canvas
.
on
(
"mouse:up"
,
function
(
options
)
{
var
xy
=
transformMouse
(
options
.
e
.
offsetX
,
options
.
e
.
offsetY
);
mouseTo
.
x
=
xy
.
x
;
mouseTo
.
y
=
xy
.
y
;
// drawing();
drawingObject
=
null
;
moveCount
=
1
;
doDrawing
=
false
;
});
canvas
.
on
(
"mouse:move"
,
function
(
options
)
{
if
(
moveCount
%
2
&&
!
doDrawing
)
{
//减少绘制频率
return
;
}
moveCount
++
;
var
xy
=
transformMouse
(
options
.
e
.
offsetX
,
options
.
e
.
offsetY
);
mouseTo
.
x
=
xy
.
x
;
mouseTo
.
y
=
xy
.
y
;
drawType
=
"rectangle"
;
drawing
();
});
function
transformMouse
(
mouseX
,
mouseY
)
{
return
{
x
:
mouseX
/
window
.
zoom
,
y
:
mouseY
/
window
.
zoom
};
}
function
drawing
()
{
if
(
drawingObject
)
{
canvas
.
remove
(
drawingObject
);
}
var
canvasObject
=
null
;
switch
(
drawType
)
{
case
"arrow"
:
//箭头
canvasObject
=
new
fabric
.
Path
(
drawArrow
(
mouseFrom
.
x
,
mouseFrom
.
y
,
mouseTo
.
x
,
mouseTo
.
y
,
30
,
30
),
{
stroke
:
color
,
fill
:
"rgba(255,255,255,0)"
,
strokeWidth
:
drawWidth
,
}
);
break
;
case
"line"
:
//直线
canvasObject
=
new
fabric
.
Line
(
[
mouseFrom
.
x
,
mouseFrom
.
y
,
mouseTo
.
x
,
mouseTo
.
y
],
{
stroke
:
color
,
strokeWidth
:
drawWidth
,
}
);
break
;
case
"dottedline"
:
//虚线
canvasObject
=
new
fabric
.
Line
(
[
mouseFrom
.
x
,
mouseFrom
.
y
,
mouseTo
.
x
,
mouseTo
.
y
],
{
strokeDashArray
:
[
3
,
1
],
stroke
:
color
,
strokeWidth
:
drawWidth
,
}
);
break
;
case
"circle"
:
//正圆
var
left
=
mouseFrom
.
x
,
top
=
mouseFrom
.
y
;
var
radius
=
Math
.
sqrt
(
(
mouseTo
.
x
-
left
)
*
(
mouseTo
.
x
-
left
)
+
(
mouseTo
.
y
-
top
)
*
(
mouseTo
.
y
-
top
)
)
/
2
;
canvasObject
=
new
fabric
.
Circle
({
left
:
left
,
top
:
top
,
stroke
:
color
,
fill
:
"rgba(255, 255, 255, 0)"
,
radius
:
radius
,
strokeWidth
:
drawWidth
,
});
break
;
case
"ellipse"
:
//椭圆
var
left
=
mouseFrom
.
x
,
top
=
mouseFrom
.
y
;
var
radius
=
Math
.
sqrt
(
(
mouseTo
.
x
-
left
)
*
(
mouseTo
.
x
-
left
)
+
(
mouseTo
.
y
-
top
)
*
(
mouseTo
.
y
-
top
)
)
/
2
;
canvasObject
=
new
fabric
.
Ellipse
({
left
:
left
,
top
:
top
,
stroke
:
color
,
fill
:
"rgba(255, 255, 255, 0)"
,
originX
:
"center"
,
originY
:
"center"
,
rx
:
Math
.
abs
(
left
-
mouseTo
.
x
),
ry
:
Math
.
abs
(
top
-
mouseTo
.
y
),
strokeWidth
:
drawWidth
,
});
break
;
case
"square"
:
//TODO:正方形(后期完善)
break
;
case
"rectangle"
:
//长方形
var
left
=
mouseFrom
.
x
,
top
=
mouseFrom
.
y
;
canvasObject
=
new
fabric
.
Rect
({
left
:
left
,
top
:
top
,
width
:
mouseTo
.
x
-
left
,
//矩形的宽度
height
:
mouseTo
.
y
-
top
,
//矩形的高度
fill
:
"rgba(0,0,0,.3)"
,
//填充的颜色
stroke
:
"orange"
,
// 边框原色
strokeWidth
:
1
,
// 边框大小
});
canvasObject
.
on
(
"selected"
,
function
()
{
cvselect
=
true
;
cvunselect
=
true
;
curObjcet
=
canvasObject
;
vthis
.
selectklass
(
canvasObject
);
});
canvasObject
.
on
(
"deselected"
,
function
()
{
vthis
.
setAreaconfig
();
var
group
=
canvas
.
getObjects
();
var
confdata
=
vthis
.
basconfig
[
vthis
.
cindex
];
confdata
.
roi
=
group
;
cvunselect
=
false
;
});
break
;
case
"rightangle"
:
//直角三角形
var
path
=
"M "
+
mouseFrom
.
x
+
" "
+
mouseFrom
.
y
+
" L "
+
mouseFrom
.
x
+
" "
+
mouseTo
.
y
+
" L "
+
mouseTo
.
x
+
" "
+
mouseTo
.
y
+
" z"
;
canvasObject
=
new
fabric
.
Path
(
path
,
{
left
:
left
,
top
:
top
,
stroke
:
color
,
strokeWidth
:
drawWidth
,
fill
:
"rgba(255, 255, 255, 0)"
,
});
break
;
case
"equilateral"
:
//等边三角形
var
height
=
mouseTo
.
y
-
mouseFrom
.
y
;
canvasObject
=
new
fabric
.
Triangle
({
top
:
mouseFrom
.
y
,
left
:
mouseFrom
.
x
,
width
:
Math
.
sqrt
(
Math
.
pow
(
height
,
2
)
+
Math
.
pow
(
height
/
2.0
,
2
)),
height
:
height
,
stroke
:
color
,
strokeWidth
:
drawWidth
,
fill
:
"rgba(255,255,255,0)"
,
});
break
;
case
"isosceles"
:
break
;
case
"text"
:
textbox
=
new
fabric
.
Textbox
(
""
,
{
left
:
mouseFrom
.
x
-
60
,
top
:
mouseFrom
.
y
-
20
,
width
:
150
,
fontSize
:
18
,
borderColor
:
"#2c2c2c"
,
fill
:
color
,
hasControls
:
false
,
});
canvas
.
add
(
textbox
);
textbox
.
enterEditing
();
textbox
.
hiddenTextarea
.
focus
();
break
;
case
"remove"
:
break
;
default
:
break
;
}
// canvasObject.index = getCanvasObjectIndex();
if
(
canvasObject
)
{
canvasObject
.
id
=
vthis
.
uuid
();
console
.
log
(
canvasObject
);
// canvasObject.index = getCanvasObjectIndex();
canvas
.
add
(
canvasObject
);
//.setActiveObject(canvasObject)
drawingObject
=
canvasObject
;
vthis
.
updateGroup
();
}
}
},
};
</
script
>
<
style
scoped
>
#main
{
width
:
700px
;
height
:
500px
;
}
button
{
cursor
:
pointer
;
}
.modal-title
{
float
:
left
;
width
:
93%
;
overflow
:
hidden
;
}
.modal-body
{
height
:
555px
!important
;
display
:
flex
;
}
.modal-editbox
{
position
:
relative
;
float
:
right
;
min-height
:
450px
;
width
:
22%
;
color
:
#fff
;
}
.modal-editbox
.modal-lb
{
position
:
absolute
;
bottom
:
0
;
width
:
150px
;
}
.modal-left
{
position
:
relative
;
text-align
:
center
;
width
:
700px
;
}
.modal-right
{
flex
:
1
;
height
:
500px
;
border
:
1px
solid
#ccc
;
margin-left
:
20px
;
}
.pic
{
position
:
absolute
;
top
:
0
;
left
:
0
;
border
:
1px
solid
#ccc
;
background
:
url("../../../../assets/img/home/bk.png")
no-repeat
;
background-size
:
100%
100%
;
}
.pic
img
{
width
:
700px
;
height
:
500px
;
margin
:
0
;
padding
:
0
;
}
.be-content
{
margin
:
15px
0
0
10px
;
}
.be-header
{
text-align
:
center
;
margin
:
10px
0
;
}
.typebox
{
max-height
:
200px
;
min-height
:
100px
;
overflow-y
:
auto
;
display
:
flex
;
flex-direction
:
row
;
}
.configbox
{
height
:
230px
;
margin-right
:
10px
;
display
:
flex
;
flex-direction
:
row
;
}
.areabox
{
height
:
230px
;
width
:
90px
;
border
:
1px
solid
#ccc
;
border-radius
:
2px
;
position
:
relative
;
}
.setbox
{
flex
:
1
;
margin-left
:
10px
;
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
}
.listbox
{
width
:
93px
;
border
:
1px
solid
#dcdfe6
;
margin
:
0
10px
10px
0
;
height
:
35px
;
border-radius
:
5px
;
}
.checkgrop
{
width
:
20px
;
margin
:
10px
0
0
5px
;
overflow
:
hidden
;
}
.typetext
{
margin
:
8px
0
0
0
;
}
.curlist
{
border
:
1px
solid
#2d8cf0
;
}
.area-header
{
text-align
:
center
;
border-bottom
:
1px
solid
#ccc
;
}
.bottombtn
{
position
:
absolute
;
bottom
:
0
;
width
:
90px
;
text-align
:
center
;
}
.configlabel
{
width
:
120px
;
display
:
inline-block
;
}
.setboxitem
{
display
:
flex
;
flex-direction
:
row
;
margin
:
10px
5px
0
0
;
}
.area-item
{
text-align
:
center
;
border-bottom
:
1px
solid
#dcdfe6
;
}
.activeare
{
text-align
:
center
;
color
:
#2d8cf0
;
}
</
style
>
src/views/search/vehicleSearch.vue
View file @
e9b878f
...
...
@@ -380,9 +380,13 @@
<el-form-item
label=
"车身颜色:"
>
<span>
{{ detailObj.vehicle_body_color_text }}
</span>
</el-form-item>
<el-form-item
label=
"车辆速度:"
>
<span
v-if=
"detailObj.event_data"
>
{{ detailObj.event_data.speed?detailObj.event_data.speed:"0" }}
</span>
</el-form-item>
<el-form-item
label=
"特殊车辆:"
>
<span>
{{ detailObj.special_text }}
</span>
</el-form-item>
<!-- <el-form-item label="标志物:">
<span>{{ detailObj.RefinedFeature_text }}</span>
</el-form-item> -->
...
...
@@ -568,6 +572,7 @@ export default {
return
false
;
}
this
.
detailObj
=
this
.
formatterData
[
this
.
currentIndex
-
1
];
console
.
log
(
this
.
detailObj
);
this
.
currentIndex
-=
1
;
this
.
getImg
(
this
.
detailObj
.
pics
[
0
].
pic_unid
);
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment