Commit cba98b71 by 张超军

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

parent ab996b9d
<!--
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -2244,7 +2244,6 @@ export default {
method: "get",
url:
"/api/export/trait/xml/person/" + this.barcode + "/" + this.seq,
loading: false,
});
//console.log(res);
......@@ -2406,56 +2405,64 @@ export default {
sessionStorage.getItem(`auto${this.seq}`)
);
if (self.autoTzdArr && self.autoTzdArr.length >= 0) {
self.autoTzdArr.forEach((item, index) => {
$(
`<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>`
).appendTo(".tzdDrawing");
$(".auto_tzdDom").css("display", "flex");
$(".auto_tzdDom").css("align-items", "center");
$(".auto_tzdDom").css("position", "absolute");
$(".auto_tzdDom").css("transform-origin", self.pixel_4 + "px center");
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>`
).appendTo(".tzdDrawing");
$(".auto_tzdDom").css("display", "flex");
$(".auto_tzdDom").css("align-items", "center");
$(".auto_tzdDom").css("position", "absolute");
$(".auto_tzdDom").css("transform-origin", self.pixel_4+"px center");
$(".auto_tzdDom .head").css("width", 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("background-color", "#FFFD0F");
$(".auto_tzdDom .head").css("width", 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("background-color", "#FFFD0F");
$(".auto_tzdDom .direction").css("width", self.pixel_20 + "px");
$(".auto_tzdDom .direction").css("height", self.pixel_2 + "px");
$(".auto_tzdDom .direction").css("background-color", "#FFFD0F");
$(".auto_tzdDom .direction").css("width", self.pixel_20+"px");
$(".auto_tzdDom .direction").css("height", self.pixel_2+"px");
$(".auto_tzdDom .direction").css("background-color", "#FFFD0F");
$(`#auto_tzdDom${self.tzdId}`).css(
"left",
(item.zwtzd_tzxzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css(
"top",
(item.zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box");
if (self.zwType == self.$t('Common.palm')) {
$("#auto_tzdDom" + self.tzdId).css(
"transform",
`rotate(${-item.zwtzd_tzfx}deg) scale(${self.ratio + 0.1})`
$(`#auto_tzdDom${self.tzdId}`).css(
"left",
(item.zwtzd_tzxzb - self.pixel_4) / self.zoomLevel + "px"
);
} else {
$("#auto_tzdDom" + self.tzdId).css(
"transform",
`rotate(${-item.zwtzd_tzfx}deg)`
$(`#auto_tzdDom${self.tzdId}`).css(
"top",
(item.zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box");
if(self.zwType == '掌纹') {
$("#auto_tzdDom" + self.tzdId).css(
"transform",
`rotate(${-item.zwtzd_tzfx}deg) scale(${self.ratio+0.1})`
);
} else {
$("#auto_tzdDom" + self.tzdId).css(
"transform",
`rotate(${-item.zwtzd_tzfx}deg)`
);
}
self.tzdId++;
// 特征点数量
self.tzdnumber++;
console.log(item);
self.autoTzdArr_num++;
console.log(self.autoTzdArr_num);
window.requestAnimationFrame(requestAnimationFun)
}
self.tzdId++;
// 特征点数量
self.tzdnumber++;
});
self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr);
// 将自动提取的特征点存入session中
sessionStorage.setItem(
`auto${self.seq}`,
JSON.stringify(self.autoTzdArr)
);
}
requestAnimationFun()
}
self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr);
// 将自动提取的特征点存入session中
sessionStorage.setItem(
`auto${self.seq}`,
JSON.stringify(self.autoTzdArr)
);
}
}
},
......
<!--
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -3909,7 +3909,6 @@ export default {
let res = await this.$axios({
method: "get",
url: "/api/export/trait/xml/case/palm/" + this.barcode + "/" + this.seq,
loading: false
});
// console.log(res);
if (res.data.code === 0) {
......@@ -4073,7 +4072,6 @@ export default {
let res = await this.$axios({
method: "get",
url: "/api/export/trait/xml/case/" + this.barcode + "/" + this.seq,
loading: false
});
// console.log(res);
......@@ -4234,40 +4232,58 @@ export default {
// 从session中拿
if (sessionStorage.getItem(`auto_tzdDom${this.seq}`)) {
self.autoTzdArr = JSON.parse(sessionStorage.getItem(`auto_tzdDom${this.seq}`));
self.autoTzdArr.forEach((item, index) => {
$(
`<div id="auto_tzdDom${self.tzdId}" class="auto_tzdDom"><div class="head"></div><div class="direction"></div></div>`
).appendTo(".tzdDrawing");
$(".auto_tzdDom").css("display", "flex");
$(".auto_tzdDom").css("align-items", "center");
$(".auto_tzdDom").css("position", "absolute");
$(".auto_tzdDom").css("transform-origin", self.pixel_4+"px center");
$(".auto_tzdDom .head").css("width", 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("background-color", "#FFFD0F");
$(".auto_tzdDom .direction").css("width", self.pixel_20+"px");
$(".auto_tzdDom .direction").css("height", self.pixel_2+"px");
$(".auto_tzdDom .direction").css("background-color", "#FFFD0F");
$(`#auto_tzdDom${self.tzdId}`).css(
"left",
(item.xczw_zwtzd_tzxzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css(
"top",
(item.xczw_zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css("box-sizing", "border-box");
$(`#auto_tzdDom${self.tzdId}`).css(
"transform",
`rotate(${-item.xczw_zwtzd_tzfx}deg)`
);
self.tzdId++
self.tzdnumber++
});
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>`
).appendTo(".tzdDrawing");
$(".auto_tzdDom").css("display", "flex");
$(".auto_tzdDom").css("align-items", "center");
$(".auto_tzdDom").css("position", "absolute");
$(".auto_tzdDom").css("transform-origin", self.pixel_4+"px center");
$(".auto_tzdDom .head").css("width", 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("background-color", "#FFFD0F");
$(".auto_tzdDom .direction").css("width", self.pixel_20+"px");
$(".auto_tzdDom .direction").css("height", self.pixel_2+"px");
$(".auto_tzdDom .direction").css("background-color", "#FFFD0F");
$(`#auto_tzdDom${self.tzdId}`).css(
"left",
(item.xczw_zwtzd_tzxzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#auto_tzdDom${self.tzdId}`).css(
"top",
(item.xczw_zwtzd_tzyzb - self.pixel_4) / self.zoomLevel + "px"
);
$(`#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(
"transform",
`rotate(${-item.xczw_zwtzd_tzfx}deg)`
);
}
self.tzdId++;
// 特征点数量
self.tzdnumber++;
self.autoTzdArr_num++;
console.log(self.autoTzdArr_num);
window.requestAnimationFrame(requestAnimationFun)
}
}
requestAnimationFun()
}
self.$store.commit("zwbj/setAutoTzdall", self.autoTzdArr);
// 将自动提取的特征点存入session中
sessionStorage.setItem(`auto_tzdDom${self.seq}`, JSON.stringify(self.autoTzdArr));
......@@ -4439,8 +4455,14 @@ export default {
// 实际需要保存入库的图片宽高
let blcWidth = $(".blc").width()
let blcHeight = $(".blc").height()
let tj_width = Math.ceil(2304 * blcWidth / this.canvasWidth)
let tj_height = Math.ceil(2304 * blcHeight / this.canvasHeight)
var tj_width = Math.ceil(2304 * blcWidth / this.canvasWidth)
// 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_height);
// 创建需要的宽高的img
......@@ -4506,7 +4528,7 @@ export default {
// self.$bus.emit('updateList')
self.$bus.emit('updateList_hand')
} else {
self.$message.error($t('Ajzwbj.storage_saved_fail'))
self.$message.error(self.$t('Ajzwbj.storage_saved_fail'))
self.$bus.emit('updateList_hand')
}
// 去掉外层边框
......
<template>
<!-- <div class="login_account width70 middle" v-show="isShow">
<div class="login_account width70 middle" v-show="isShow">
<el-input
class="width100 margin_top25_bottom10"
type="text"
......@@ -46,12 +46,12 @@
:loading="btnLoading"
>{{ $t('Login.login_btn') }}
</el-button>
</div>-->
</div>
<!-- 对接线上 -->
<div class="AccountsLogin">
<!-- <div class="AccountsLogin">
<div class="el-icon-loading"></div>
<span>正在加载中...</span>
</div>
</div> -->
</template>
<script>
......
/*
* @Author: your name
* @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
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -104,11 +104,12 @@ module.exports = {
// 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.104:8099", // 江
// target: "http://172.20.0.149:8099", // 北京 张
// target: "http://192.168.0.109:8099", // 西藏 张
target: "http://192.168.0.134:8099", // 西藏 马
// target: "http://192.168.0.109:8099", // 西藏 张
// target: "http://192.168.0.134:8099", // 西藏 马
// target: "http://192.168.0.130:8099", // 西藏 刘
ws: true,
changeOrigin: true,
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