Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
常超
founder_vue
Commits
fbabb38a
Commit
fbabb38a
authored
Dec 20, 2021
by
张超军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
案件特征点旋转+翻转(保存+提取)完成
parent
930515d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
38 deletions
+139
-38
dist.zip
+0
-0
src/views/Editor/modules/imageEdAJ.vue
+136
-35
vue.config.js
+3
-3
No files found.
dist.zip
View file @
fbabb38a
No preview for this file type
src/views/Editor/modules/imageEdAJ.vue
View file @
fbabb38a
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-12-
18 14:15:46
* @LastEditTime: 2021-12-
20 00:42:28
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...
...
@@ -2456,6 +2456,12 @@ export default {
}
else
{
$
(
`#tzd
${
self
.
tzdId
}
`
).
css
(
"left"
,
x
-
4
+
"px"
);
$
(
`#tzd
${
self
.
tzdId
}
`
).
css
(
"top"
,
y
-
4
+
"px"
);
self
.
tzdArr
.
forEach
(
item
=>
{
if
(
item
.
id
==
self
.
tzdId
)
{
item
.
x
=
x
-
4
item
.
y
=
y
-
4
}
})
}
// console.log(self.imageEditor._graphics.getCanvasImage());
...
...
@@ -2882,10 +2888,8 @@ export default {
-
angle
);
console
.
log
(
x
,
y
);
}
}
}
}
if
(
self
.
isHandTZD
)
{
...
...
@@ -2938,33 +2942,45 @@ export default {
if
(
self
.
deg
)
{
// $("#tzd" + self.tzdId).css("transform", `rotate(${-self.deg - self.startPlace}deg)`);
if
(
!
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipY
&&
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipX
)
{
let
deg
=
(
360
-
(
self
.
deg
+
angle
+
180
))
if
(
deg
>
360
)
{
deg
=
deg
-
360
}
else
if
(
deg
<
0
)
{
deg
=
deg
+
360
}
$
(
"#tzd"
+
self
.
tzdId
).
css
(
"transform"
,
`rotate(
${
self
.
deg
+
angle
+
180
}
deg)`
`rotate(
${
-
deg
}
deg)`
);
self
.
tzdArr
.
forEach
(
item
=>
{
if
(
item
.
id
==
self
.
tzdId
)
{
item
.
angle
=
-
(
self
.
deg
+
angle
+
180
)
item
.
angle
=
deg
}
})
}
else
if
(
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipY
&&
!
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipX
)
{
$
(
"#tzd"
+
self
.
tzdId
).
css
(
"transform"
,
`rotate(
${
self
.
deg
+
angle
}
deg)`
`rotate(
${
-
(
360
-
(
self
.
deg
+
angle
))
}
deg)`
);
self
.
tzdArr
.
forEach
(
item
=>
{
if
(
item
.
id
==
self
.
tzdId
)
{
item
.
angle
=
-
(
self
.
deg
+
angle
)
item
.
angle
=
(
360
-
(
self
.
deg
+
angle
)
)
}
})
}
else
if
(
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipY
&&
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
flipX
)
{
let
deg
=
self
.
deg
+
angle
-
180
if
(
deg
>
360
)
{
deg
=
deg
-
360
}
else
if
(
deg
<
0
)
{
deg
=
deg
+
360
}
$
(
"#tzd"
+
self
.
tzdId
).
css
(
"transform"
,
`rotate(
${
-
self
.
deg
-
angle
-
180
}
deg)`
`rotate(
${
-
deg
}
deg)`
);
self
.
tzdArr
.
forEach
(
item
=>
{
if
(
item
.
id
==
self
.
tzdId
)
{
item
.
angle
=
-
(
-
self
.
deg
-
angle
-
180
)
item
.
angle
=
deg
}
})
}
else
{
...
...
@@ -5341,6 +5357,7 @@ export default {
// 特征点
self
.
autoTzdArr
=
[]
self
.
tzdArr
=
[]
self
.
tzdall
=
[]
$
(
'.auto_tzdDom'
).
remove
()
$
(
'.tzdDom'
).
remove
()
...
...
@@ -6550,6 +6567,12 @@ export default {
}
}
else
if
(
this
.
saveType
===
"当前特征和图片"
)
{
let
canvasImage
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
();
let
flipX
=
canvasImage
.
flipY
let
flipY
=
canvasImage
.
flipX
flipX
=
flipX
?
1
:
0
flipY
=
flipY
?
1
:
0
// 处理特征点---保存前需要处理数据
// 自动的
self
.
tzdall
=
[];
...
...
@@ -6578,7 +6601,6 @@ export default {
self
.
tzdall2
=
[];
// 获取 tzdDrawing 旋转的角度
let
canvasImage
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
();
let
tzdDrawing_angle
=
canvasImage
.
angle
;
console
.
log
(
tzdDrawing_angle
);
self
.
tzdall
.
forEach
((
item
)
=>
{
...
...
@@ -6594,7 +6616,16 @@ export default {
// const angle = -Math.PI / 2;
// 角度超出360°范围了
const
angle
=
tzdDrawing_angle
*
Math
.
PI
/
180.00
;
let
angle
=
tzdDrawing_angle
*
Math
.
PI
/
180.00
;
if
(
flipX
===
1
&&
flipY
===
0
)
{
angle
=
-
angle
}
else
if
(
flipX
===
0
&&
flipY
===
1
)
{
angle
=
-
angle
}
else
if
(
flipX
===
1
&&
flipY
===
1
)
{
}
else
{
}
console
.
log
(
angle
);
// 角度 * Math.PI / 180
const
[
x
,
y
]
=
reverse
(
...
...
@@ -6605,11 +6636,51 @@ export default {
-
angle
);
console
.
log
(
x
,
y
);
self
.
tzdall2
.
push
({
xczw_zwtzd_tzfx
:
item
.
xczw_zwtzd_tzfx
-
tzdDrawing_angle
,
xczw_zwtzd_tzxzb
:
x
/
self
.
width_ratio
,
xczw_zwtzd_tzyzb
:
y
/
self
.
height_ratio
});
// 如果是翻转过的,需要改变x,y的值
if
(
flipX
===
1
&&
flipY
===
0
)
{
let
deg
=
360
-
(
Number
(
item
.
xczw_zwtzd_tzfx
)
+
tzdDrawing_angle
)
if
(
deg
<
0
)
{
deg
=
deg
+
360
}
else
if
(
deg
>
360
)
{
deg
=
deg
-
360
}
self
.
tzdall2
.
push
({
xczw_zwtzd_tzfx
:
deg
,
xczw_zwtzd_tzxzb
:
x
/
self
.
width_ratio
,
xczw_zwtzd_tzyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
});
}
else
if
(
flipX
===
0
&&
flipY
===
1
)
{
let
deg
=
180
-
(
Number
(
item
.
xczw_zwtzd_tzfx
)
+
tzdDrawing_angle
)
if
(
deg
<
0
)
{
deg
=
deg
+
360
}
else
if
(
deg
>
360
)
{
deg
=
deg
-
360
}
self
.
tzdall2
.
push
({
xczw_zwtzd_tzfx
:
deg
,
xczw_zwtzd_tzxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
xczw_zwtzd_tzyzb
:
y
/
self
.
height_ratio
});
}
else
if
(
flipX
===
1
&&
flipY
===
1
)
{
let
deg
=
Number
(
item
.
xczw_zwtzd_tzfx
)
-
tzdDrawing_angle
+
180
if
(
deg
>
360
)
{
deg
=
deg
-
360
}
else
if
(
deg
<
0
)
{
deg
=
deg
+
360
}
self
.
tzdall2
.
push
({
xczw_zwtzd_tzfx
:
deg
,
xczw_zwtzd_tzxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
xczw_zwtzd_tzyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
});
}
else
{
self
.
tzdall2
.
push
({
xczw_zwtzd_tzfx
:
Number
(
item
.
xczw_zwtzd_tzfx
)
-
tzdDrawing_angle
,
xczw_zwtzd_tzxzb
:
x
/
self
.
width_ratio
,
xczw_zwtzd_tzyzb
:
y
/
self
.
height_ratio
});
}
});
// 处理数据--圆 -- 存入数据库前需要多圆心坐标点处理
...
...
@@ -6657,11 +6728,32 @@ export default {
-
angle
);
console
.
log
(
x
,
y
);
circleArr_hand_t2
.
push
({
yxtq_yxxzb
:
x
/
self
.
width_ratio
,
yxtq_yxyzb
:
y
/
self
.
height_ratio
,
yxtq_yxbj
:
item
.
yxtq_yxbj
/
self
.
height_ratio
})
// 如果是翻转过的,需要改变x,y的值
if
(
flipX
===
1
&&
flipY
===
0
)
{
circleArr_hand_t2
.
push
({
yxtq_yxxzb
:
x
/
self
.
width_ratio
,
yxtq_yxyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
,
yxtq_yxbj
:
item
.
yxtq_yxbj
/
self
.
height_ratio
})
}
else
if
(
flipX
===
0
&&
flipY
===
1
)
{
circleArr_hand_t2
.
push
({
yxtq_yxxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
yxtq_yxyzb
:
y
/
self
.
height_ratio
,
yxtq_yxbj
:
item
.
yxtq_yxbj
/
self
.
height_ratio
})
}
else
if
(
flipX
===
1
&&
flipY
===
1
)
{
circleArr_hand_t2
.
push
({
yxtq_yxxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
yxtq_yxyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
,
yxtq_yxbj
:
item
.
yxtq_yxbj
/
self
.
height_ratio
})
}
else
{
circleArr_hand_t2
.
push
({
yxtq_yxxzb
:
x
/
self
.
width_ratio
,
yxtq_yxyzb
:
y
/
self
.
height_ratio
,
yxtq_yxbj
:
item
.
yxtq_yxbj
/
self
.
height_ratio
})
}
});
// 处理数据---自由
...
...
@@ -6720,10 +6812,28 @@ export default {
det
.
y
,
-
angle
);
Fcanvasarr_s
.
push
({
zdytq_tzdxzb
:
x
/
self
.
width_ratio
,
zdytq_tzdyzb
:
y
/
self
.
height_ratio
});
// 如果是翻转过的,需要改变x,y的值
if
(
flipX
===
1
&&
flipY
===
0
)
{
Fcanvasarr_s
.
push
({
zdytq_tzdxzb
:
x
/
self
.
width_ratio
,
zdytq_tzdyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
});
}
else
if
(
flipX
===
0
&&
flipY
===
1
)
{
Fcanvasarr_s
.
push
({
zdytq_tzdxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
zdytq_tzdyzb
:
y
/
self
.
height_ratio
});
}
else
if
(
flipX
===
1
&&
flipY
===
1
)
{
Fcanvasarr_s
.
push
({
zdytq_tzdxzb
:
(
self
.
canvasBox_width
-
x
)
/
self
.
width_ratio
,
zdytq_tzdyzb
:
(
self
.
canvasBox_height
-
y
)
/
self
.
height_ratio
});
}
else
{
Fcanvasarr_s
.
push
({
zdytq_tzdxzb
:
x
/
self
.
width_ratio
,
zdytq_tzdyzb
:
y
/
self
.
height_ratio
});
}
})
Fcanvasarr_t2
.
push
({
zddxx_zyhzzbd
:
Fcanvasarr_s
...
...
@@ -6820,11 +6930,6 @@ export default {
}).
catch
(
err
=>
{
})
let
angle
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
angle
let
canvasImage
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
();
let
flipX
=
canvasImage
.
flipY
let
flipY
=
canvasImage
.
flipX
flipX
=
flipX
?
1
:
0
flipY
=
flipY
?
1
:
0
// 保存掌纹图片
this
.
$axios
({
...
...
@@ -6885,11 +6990,7 @@ export default {
// 获取图像旋转的角度
let
canvasImage_angle
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
().
angle
;
let
canvasImage
=
self
.
imageEditor
.
_graphics
.
getCanvasImage
();
let
flipX
=
canvasImage
.
flipY
let
flipY
=
canvasImage
.
flipX
flipX
=
flipX
?
1
:
0
flipY
=
flipY
?
1
:
0
this
.
$axios
({
method
:
"post"
,
...
...
vue.config.js
View file @
fbabb38a
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-12-1
8 14:32:2
4
* @LastEditTime: 2021-12-1
9 20:21:0
4
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
...
...
@@ -91,14 +91,14 @@ module.exports = {
"/api"
:
{
// target: "http://192.168.0.137:8080/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/
// target: "http://192.168.128.166:8099/", // 张 认定
target
:
"http://192.168.128.114:8099"
,
// 湖南-马
//
target: "http://192.168.128.114:8099", // 湖南-马
// target: "http://192.168.128.116:8099", // 湖南-王
// target: "http://192.168.128.118:8764", // 湖南-张呈光
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
// target: "http://127.0.0.1:8099",
// target: "http://47.92.225.109:5602",
// target: "http://www.meetfood.cn:2390", // 湖南-线上
//
target:"http://zwpt.xzclub.top:9333/",
target
:
"http://zwpt.xzclub.top:9333/"
,
// target: "http://192.168.128.115:8099", // 江
ws
:
true
,
changeOrigin
:
true
,
...
...
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