Commit cba98b71 by 张超军

人员/案件指纹编辑,特征点性能优化

parent ab996b9d
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2022-04-13 16:48:52 * @LastEditTime: 2022-04-23 10:33:43
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...@@ -2244,7 +2244,6 @@ export default { ...@@ -2244,7 +2244,6 @@ export default {
method: "get", method: "get",
url: url:
"/api/export/trait/xml/person/" + this.barcode + "/" + this.seq, "/api/export/trait/xml/person/" + this.barcode + "/" + this.seq,
loading: false,
}); });
//console.log(res); //console.log(res);
...@@ -2406,22 +2405,25 @@ export default { ...@@ -2406,22 +2405,25 @@ export default {
sessionStorage.getItem(`auto${this.seq}`) sessionStorage.getItem(`auto${this.seq}`)
); );
if (self.autoTzdArr && self.autoTzdArr.length >= 0) { if (self.autoTzdArr && self.autoTzdArr.length >= 0) {
self.autoTzdArr.forEach((item, index) => { self.autoTzdArr_num = 0
function requestAnimationFun() {
let item = self.autoTzdArr[self.autoTzdArr_num];
if(item) {
$( $(
`<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>` `<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>`
).appendTo(".tzdDrawing"); ).appendTo(".tzdDrawing");
$(".auto_tzdDom").css("display", "flex"); $(".auto_tzdDom").css("display", "flex");
$(".auto_tzdDom").css("align-items", "center"); $(".auto_tzdDom").css("align-items", "center");
$(".auto_tzdDom").css("position", "absolute"); $(".auto_tzdDom").css("position", "absolute");
$(".auto_tzdDom").css("transform-origin", self.pixel_4 + "px center"); $(".auto_tzdDom").css("transform-origin", self.pixel_4+"px center");
$(".auto_tzdDom .head").css("width", self.pixel_8 + "px"); $(".auto_tzdDom .head").css("width", self.pixel_8+"px");
$(".auto_tzdDom .head").css("height", self.pixel_8 + "px"); $(".auto_tzdDom .head").css("height", self.pixel_8+"px");
$(".auto_tzdDom .head").css("border-radius", self.pixel_8 + "px"); $(".auto_tzdDom .head").css("border-radius", self.pixel_8+"px");
$(".auto_tzdDom .head").css("background-color", "#FFFD0F"); $(".auto_tzdDom .head").css("background-color", "#FFFD0F");
$(".auto_tzdDom .direction").css("width", self.pixel_20 + "px"); $(".auto_tzdDom .direction").css("width", self.pixel_20+"px");
$(".auto_tzdDom .direction").css("height", self.pixel_2 + "px"); $(".auto_tzdDom .direction").css("height", self.pixel_2+"px");
$(".auto_tzdDom .direction").css("background-color", "#FFFD0F"); $(".auto_tzdDom .direction").css("background-color", "#FFFD0F");
$(`#auto_tzdDom${self.tzdId}`).css( $(`#auto_tzdDom${self.tzdId}`).css(
...@@ -2433,10 +2435,10 @@ export default { ...@@ -2433,10 +2435,10 @@ export default {
(item.zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px" (item.zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
); );
$(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box"); $(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box");
if (self.zwType == self.$t('Common.palm')) { if(self.zwType == '掌纹') {
$("#auto_tzdDom" + self.tzdId).css( $("#auto_tzdDom" + self.tzdId).css(
"transform", "transform",
`rotate(${-item.zwtzd_tzfx}deg) scale(${self.ratio + 0.1})` `rotate(${-item.zwtzd_tzfx}deg) scale(${self.ratio+0.1})`
); );
} else { } else {
$("#auto_tzdDom" + self.tzdId).css( $("#auto_tzdDom" + self.tzdId).css(
...@@ -2444,11 +2446,17 @@ export default { ...@@ -2444,11 +2446,17 @@ export default {
`rotate(${-item.zwtzd_tzfx}deg)` `rotate(${-item.zwtzd_tzfx}deg)`
); );
} }
self.tzdId++; self.tzdId++;
// 特征点数量 // 特征点数量
self.tzdnumber++; self.tzdnumber++;
}); console.log(item);
self.autoTzdArr_num++;
console.log(self.autoTzdArr_num);
window.requestAnimationFrame(requestAnimationFun)
}
}
requestAnimationFun()
}
self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr); self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr);
// 将自动提取的特征点存入session中 // 将自动提取的特征点存入session中
sessionStorage.setItem( sessionStorage.setItem(
...@@ -2457,7 +2465,6 @@ export default { ...@@ -2457,7 +2465,6 @@ export default {
); );
} }
} }
}
}, },
/** /**
* @description: 获取两点之间的距离 * @description: 获取两点之间的距离
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2022-04-13 16:51:37 * @LastEditTime: 2022-04-23 10:34:34
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...@@ -3909,7 +3909,6 @@ export default { ...@@ -3909,7 +3909,6 @@ export default {
let res = await this.$axios({ let res = await this.$axios({
method: "get", method: "get",
url: "/api/export/trait/xml/case/palm/" + this.barcode + "/" + this.seq, url: "/api/export/trait/xml/case/palm/" + this.barcode + "/" + this.seq,
loading: false
}); });
// console.log(res); // console.log(res);
if (res.data.code === 0) { if (res.data.code === 0) {
...@@ -4073,7 +4072,6 @@ export default { ...@@ -4073,7 +4072,6 @@ export default {
let res = await this.$axios({ let res = await this.$axios({
method: "get", method: "get",
url: "/api/export/trait/xml/case/" + this.barcode + "/" + this.seq, url: "/api/export/trait/xml/case/" + this.barcode + "/" + this.seq,
loading: false
}); });
// console.log(res); // console.log(res);
...@@ -4234,7 +4232,11 @@ export default { ...@@ -4234,7 +4232,11 @@ export default {
// 从session中拿 // 从session中拿
if (sessionStorage.getItem(`auto_tzdDom${this.seq}`)) { if (sessionStorage.getItem(`auto_tzdDom${this.seq}`)) {
self.autoTzdArr = JSON.parse(sessionStorage.getItem(`auto_tzdDom${this.seq}`)); self.autoTzdArr = JSON.parse(sessionStorage.getItem(`auto_tzdDom${this.seq}`));
self.autoTzdArr.forEach((item, index) => { if(self.autoTzdArr && self.autoTzdArr.length > 0) {
self.autoTzdArr_num = 0
function requestAnimationFun() {
let item = self.autoTzdArr[self.autoTzdArr_num];
if(item) {
$( $(
`<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>` `<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>`
).appendTo(".tzdDrawing"); ).appendTo(".tzdDrawing");
...@@ -4261,13 +4263,27 @@ export default { ...@@ -4261,13 +4263,27 @@ export default {
(item.xczw_zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px" (item.xczw_zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
); );
$(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box"); $(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box");
if(self.zwType == '掌纹') {
$(`#auto_tzdDom${self.tzdId}`).css(
"transform",
`rotate(${-item.xczw_zwtzd_tzfx}deg) scale(${self.ratio+0.1})`
);
} else {
$(`#auto_tzdDom${self.tzdId}`).css( $(`#auto_tzdDom${self.tzdId}`).css(
"transform", "transform",
`rotate(${-item.xczw_zwtzd_tzfx}deg)` `rotate(${-item.xczw_zwtzd_tzfx}deg)`
); );
self.tzdId++ }
self.tzdnumber++ self.tzdId++;
}); // 特征点数量
self.tzdnumber++;
self.autoTzdArr_num++;
console.log(self.autoTzdArr_num);
window.requestAnimationFrame(requestAnimationFun)
}
}
requestAnimationFun()
}
self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr); self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr);
// 将自动提取的特征点存入session中 // 将自动提取的特征点存入session中
sessionStorage.setItem(`auto_tzdDom${self.seq}`, JSON.stringify(self.autoTzdArr)); sessionStorage.setItem(`auto_tzdDom${self.seq}`, JSON.stringify(self.autoTzdArr));
...@@ -4439,8 +4455,14 @@ export default { ...@@ -4439,8 +4455,14 @@ export default {
// 实际需要保存入库的图片宽高 // 实际需要保存入库的图片宽高
let blcWidth = $(".blc").width() let blcWidth = $(".blc").width()
let blcHeight = $(".blc").height() let blcHeight = $(".blc").height()
let tj_width = Math.ceil(2304 * blcWidth / this.canvasWidth) var tj_width = Math.ceil(2304 * blcWidth / this.canvasWidth)
let tj_height = Math.ceil(2304 * blcHeight / this.canvasHeight) // while(tj_width % 4 != 0) {
// tj_width = tj_width + 1
// }
var tj_height = Math.ceil(2304 * blcHeight / this.canvasHeight)
// while(tj_height % 4 != 0) {
// tj_height = tj_height + 1
// }
console.log(tj_width); console.log(tj_width);
console.log(tj_height); console.log(tj_height);
// 创建需要的宽高的img // 创建需要的宽高的img
...@@ -4506,7 +4528,7 @@ export default { ...@@ -4506,7 +4528,7 @@ export default {
// self.$bus.emit('updateList') // self.$bus.emit('updateList')
self.$bus.emit('updateList_hand') self.$bus.emit('updateList_hand')
} else { } else {
self.$message.error($t('Ajzwbj.storage_saved_fail')) self.$message.error(self.$t('Ajzwbj.storage_saved_fail'))
self.$bus.emit('updateList_hand') self.$bus.emit('updateList_hand')
} }
// 去掉外层边框 // 去掉外层边框
......
<template> <template>
<!-- <div class="login_account width70 middle" v-show="isShow"> <div class="login_account width70 middle" v-show="isShow">
<el-input <el-input
class="width100 margin_top25_bottom10" class="width100 margin_top25_bottom10"
type="text" type="text"
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
:loading="btnLoading" :loading="btnLoading"
>{{ $t('Login.login_btn') }} >{{ $t('Login.login_btn') }}
</el-button> </el-button>
</div>--> </div>
<!-- 对接线上 --> <!-- 对接线上 -->
<div class="AccountsLogin"> <!-- <div class="AccountsLogin">
<div class="el-icon-loading"></div> <div class="el-icon-loading"></div>
<span>正在加载中...</span> <span>正在加载中...</span>
</div> </div> -->
</template> </template>
<script> <script>
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-04-20 16:38:45 * @LastEditTime: 2022-04-23 10:28:17
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js * @FilePath: \指纹系统\founder_vue\vue.config.js
...@@ -104,11 +104,12 @@ module.exports = { ...@@ -104,11 +104,12 @@ module.exports = {
// target: "http://127.0.0.1:8099", // target: "http://127.0.0.1:8099",
// target: "http://47.92.225.109:5602", // target: "http://47.92.225.109:5602",
// target: "http://www.meetfood.cn:2390", // 湖南-线上 // target: "http://www.meetfood.cn:2390", // 湖南-线上
// target: "http://zwpt.xzclub.top:9333/", target: "http://zwpt.xzclub.top:9333/",
// target: "http://192.168.128.104:8099", // 江 // target: "http://192.168.128.104:8099", // 江
// target: "http://172.20.0.149:8099", // 北京 张 // target: "http://172.20.0.149:8099", // 北京 张
// target: "http://192.168.0.109:8099", // 西藏 张 // target: "http://192.168.0.109:8099", // 西藏 张
target: "http://192.168.0.134:8099", // 西藏 马 // target: "http://192.168.0.134:8099", // 西藏 马
// target: "http://192.168.0.130:8099", // 西藏 刘
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment