Commit b9813579 by 张超军

1.掌纹缺掌。2.指掌纹切换(单双击都可) -- 西藏没更

parent 96ffcfc5
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-06-16 13:27:36 * @LastEditTime: 2022-06-26 16:58:52
* @LastEditors: error: git config user.name && git config user.email & please set dead value or install git * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \指纹系统\founder_vue\babel.config.js * @FilePath: \指纹系统\founder_vue\babel.config.js
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
let plugins = []; let plugins = [];
if (process.env.NODE_ENV === "production") { // todo if判断是否打包,打包环境下控制台去掉console.log,也可去掉if判断,整个项目不会出现console.log(不建议) if (process.env.NODE_ENV === "production") { // todo if判断是否打包,打包环境下控制台去掉console.log,也可去掉if判断,整个项目不会出现console.log(不建议)
// plugins.push("transform-remove-console"); plugins.push("transform-remove-console");
} }
module.exports = { module.exports = {
// presets: ["@vue/cli-plugin-babel/preset"], presets: ["@vue/cli-plugin-babel/preset"],
// plugins: plugins plugins: plugins
presets: ['@vue/app'], // presets: ['@vue/app'],
plugins: ["@babel/plugin-proposal-optional-chaining"] // plugins: ["@babel/plugin-proposal-optional-chaining"]
}; };
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
"ol": "^6.9.0", "ol": "^6.9.0",
"pinyin-match": "^1.2.2", "pinyin-match": "^1.2.2",
"postcss-px2rem": "^0.3.0", "postcss-px2rem": "^0.3.0",
"print-js": "^1.6.0",
"px2rem": "^0.5.0", "px2rem": "^0.5.0",
"px2rem-loader": "^0.1.9", "px2rem-loader": "^0.1.9",
"qs": "^6.9.4", "qs": "^6.9.4",
......
...@@ -87,14 +87,9 @@ export default { ...@@ -87,14 +87,9 @@ export default {
userToken: null, userToken: null,
appToken: null, appToken: null,
appId: zzwxtCloud.appId, appId: zzwxtCloud.appId,
_beforeUnload_time: new Date().getTime(),
_gap_time: new Date().getTime(),
} }
}, },
async mounted() { async mounted() {
window.addEventListener('beforeunload', (e) => this.beforeunloadHandler(e))
window.addEventListener('unload', (e) => this.unloadHandler(e))
let self = this let self = this
function getIPs(callback) { function getIPs(callback) {
var ip_dups = {} var ip_dups = {}
...@@ -235,50 +230,6 @@ export default { ...@@ -235,50 +230,6 @@ export default {
console.log(this.$route); console.log(this.$route);
}, },
methods: { methods: {
// 页面关闭
async unloadHandler(e) {
this._gap_time = new Date().getTime() - this._beforeUnload_time
//判断是窗口关闭还是刷新
if (this._gap_time <= 5) {
//如果是登录状态,关闭窗口前,移除用户
// $.ajax({
// url: '/api/queryque/updateQueryStatus',
// type: 'post',
// async: false, //或false,是否异步
// })
if(this.$route.path == '/') {
let url = '/api/queryque/updateQueryStatus'
navigator.sendBeacon(url)
}
// let url = '/api/queryque/updateQueryStatus'
// const xhr = new XMLHttpRequest()
// xhr.open('POST', url, false)
// xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8')
// xhr.setRequestHeader(
// 'Authorization',
// 'Security-ceyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2NTU3MDM4MTQsImF1dGhvcml0aWVzIjoiXCJST0xFX0IsUk9MRV9DLFJPTEVfRCxST0xFX0UsUk9MRV9GLFJPTEVfRyxST0xFX0ctNSxST0xFX0ItMyxST0xFX0ItMixST0xFX0ItMSxST0xFX0MtNixST0xFX0ktOSxST0xFX0ktMTAsUk9MRV9FLTEsUk9MRV9ELTEsUk9MRV9JLTExLFJPTEVfRS03LFJPTEVfRS04LFJPTEVfRGF0YS1FLFJPTEVfRGF0YS1FLTEsUk9MRV9ILFJPTEVfSSxST0xFX0MtMyxST0xFX0MtNCxST0xFX0MtNSxST0xFX0QtNixST0xFX0QtMTAsUk9MRV9ELTgsUk9MRV9ELTEyLFJPTEVfRC05LFJPTEVfRC03LFJPTEVfRC0xMSxST0xFX0YtMixST0xFX0YtMSxST0xFX0ctMixST0xFX0gtMSxST0xFX0ktMixST0xFX0ktMyxST0xFX0ktMSxST0xFX0ktNCxST0xFX0MtMixST0xFX0MtMSxST0xFX0QtNSxST0xFX0QtNCxST0xFX0QtMixST0xFX0YtMyxST0xFX0YtNCxST0xFX0YtNSxST0xFX0ctMSxST0xFX0ctMyxST0xFX0ktOCxST0xFX0gtMixST0xFX0gtNCxST0xFX0gtNixST0xFX0gtMyxST0xFX0gtNSxST0xFX0ktNixST0xFX0ktNSxST0xFX0ktNyxST0xFX0UtNixST0xFX0UtMixST0xFX0UtMyxST0xFX0UtNSxST0xFX0UtNFwiIiwiaXNzIjoiemNnIiwiZXhwIjoxNjU1NzA3NDE0fQ.ry2kiAudLv2xvLAsLWLSCKwldfZ-dZtw_WaN57BG2Hkv3Y6AhdyxrimPUF8xdyWmK6figaSK1lER-_hgItjTPQ'
// )
// xhr.setRequestHeader('BrowserHeader', 'H5')
// xhr.setRequestHeader(
// 'userInfo',
// 'eyJsb2dVc2VySXAiOiIxNzIuMTguMTA4LjM3IiwibG9nVXNlck5hbWUiOiLnrqHnkIblkZgiLCJsb2dVc2VySWQiOjEsImxvZ0R3Q29kZSI6IjU0MDAwMDAwMDAwMCIsImxvZ0R3TmFtZSI6Iuilv+iXj+iHquayu+WMuuWFrOWuieWOhSIsImxvZ1RpbWUiOiIyMDIyLTA2LTIwIDEzOjQ1OjMwIn0='
// )
// xhr.send()
}
},
// 页面关闭之前,触发提示框
beforeunloadHandler(e) {
this._beforeUnload_time = new Date().getTime()
// if (e) {
// e = e || window.event
// console.log(e)
// if (e) {
// e.returnValue = '关闭提示'
// }
// return '关闭提示'
// }
},
// 登录 // 登录
login(userinfo) { login(userinfo) {
let me = this let me = this
...@@ -599,12 +550,6 @@ export default { ...@@ -599,12 +550,6 @@ export default {
console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
}, },
}, },
destroyed() {
window.removeEventListener('beforeunload', (e) =>
this.beforeunloadHandler(e)
)
window.removeEventListener('unload', (e) => this.unloadHandler(e))
},
} }
</script> </script>
......
...@@ -719,10 +719,10 @@ $foundColor: var(--foundColor, #ffffff); //ffc005 ...@@ -719,10 +719,10 @@ $foundColor: var(--foundColor, #ffffff); //ffc005
object-fit: contain; object-fit: contain;
justify-content: center; justify-content: center;
img { img {
width: 100%; width: auto;
height: 100%; height: 99%;
width: 540px; // width: 540px;
height: 480px; // height: 480px;
} }
} }
.loading { .loading {
......
...@@ -1348,7 +1348,7 @@ export default { ...@@ -1348,7 +1348,7 @@ export default {
// 是否展示掌纹采集 // 是否展示掌纹采集
isShowHandsPrint: 0, isShowHandsPrint: 0,
// 区分单双击事件 // 区分单双击事件
Vuetime: 200 Vuetime: 200,
} }
}, },
components: { components: {
...@@ -1590,6 +1590,23 @@ export default { ...@@ -1590,6 +1590,23 @@ export default {
} catch (error) { } catch (error) {
//console.log(error); //console.log(error);
} }
// try {
// // 获取600u采集器信息
// // self.ws = new WebSocket("ws://localhost:12345/websocket")
// let result = await self.get600UVersion()
// console.log(result);
// self.deviceModel = result.productName
// self.deviceSn = result.serialNumber
// self.iBversion.deviceSN = result.serialNumber
// if (result.serialNumber) {
// self.pop = false
// self.isAlter = false
// }
// } catch (error) {
// //console.log(error);
// }
// canvas // canvas
if (this.iBversion.deviceSN) { if (this.iBversion.deviceSN) {
this.canvas = document.getElementById("frameImage"); this.canvas = document.getElementById("frameImage");
...@@ -1887,7 +1904,7 @@ export default { ...@@ -1887,7 +1904,7 @@ export default {
let cf = self.findHandCF(self.hands[index-30].code) let cf = self.findHandCF(self.hands[index-30].code)
//console.log(cf) //console.log(cf)
if (cf != null) { if (cf != null) {
self.fingerPic[cf] = { self.handsPic[cf] = {
zhwzhwdm: self.hands[index-30].code, zhwzhwdm: self.hands[index-30].code,
zhw_txsj: res.data, zhw_txsj: res.data,
zhw_txzl: self.hands[index-30].score zhw_txzl: self.hands[index-30].score
...@@ -1895,7 +1912,7 @@ export default { ...@@ -1895,7 +1912,7 @@ export default {
} else { } else {
self.fingerPic.push({ zhwzhwdm: self.hands[index-30].code, zhw_txsj: res.data, zhw_txzl: self.hands[index-30].score }) self.fingerPic.push({ zhwzhwdm: self.hands[index-30].code, zhw_txsj: res.data, zhw_txzl: self.hands[index-30].score })
} }
self.saveScore(self.rybh, rightList[index].scoreR, self.hands[index-30].code) self.saveScore(self.rybh, self.hands[index-30].score, self.hands[index-30].code)
//console.log(self.fingerPic) //console.log(self.fingerPic)
}) })
...@@ -2544,6 +2561,7 @@ export default { ...@@ -2544,6 +2561,7 @@ export default {
self.samllData["frameHeight"] = parseInt(self.frameHeight); self.samllData["frameHeight"] = parseInt(self.frameHeight);
let json = JSON.stringify(self.samllData) let json = JSON.stringify(self.samllData)
self.ws.send(json); self.ws.send(json);
console.log(self.ws);
console.log(json); console.log(json);
// 获取结果 // 获取结果
self.ws.onmessage = function (ev) { self.ws.onmessage = function (ev) {
...@@ -2558,7 +2576,7 @@ export default { ...@@ -2558,7 +2576,7 @@ export default {
if (data.hasOwnProperty("previewImage")) { if (data.hasOwnProperty("previewImage")) {
let image = new Image(); let image = new Image();
image.onload = function () { image.onload = function () {
self.ctx.drawImage(image, 0, 0); self.ctx.drawImage(image, 0, 0, parseInt(self.frameWidth), parseInt(self.frameHeight));
if (data.hasOwnProperty("singleRolledFinger")) { if (data.hasOwnProperty("singleRolledFinger")) {
self.ctx.beginPath(); self.ctx.beginPath();
self.ctx.moveTo(data.singleRolledFinger.lineX, 0); self.ctx.moveTo(data.singleRolledFinger.lineX, 0);
...@@ -2577,6 +2595,8 @@ export default { ...@@ -2577,6 +2595,8 @@ export default {
// self.fingerImg = temporaryImage; // self.fingerImg = temporaryImage;
self.frameImage = true self.frameImage = true
image.src = temporaryImage; image.src = temporaryImage;
console.log(temporaryImage);
if (self.checked) { if (self.checked) {
self.preStatusR = 4 self.preStatusR = 4
// 停止采集 // 停止采集
...@@ -3564,6 +3584,40 @@ export default { ...@@ -3564,6 +3584,40 @@ export default {
}) })
} }
}, },
get600UVersion () {
let self = this
self.ws = new WebSocket("ws://localhost:12321/websocket")
let result = new Promise((resolve, reject) => {
console.log(self.wsStatus);
if (self.wsStatus) {
let json = {}
let data = {};
data["cmd"] = 100;
json = JSON.stringify(data)
self.ws.send(json);
self.ws.onmessage = function (ev) {
json = JSON.parse(ev.data)
if (json.code == 0) {
data = json.data
if (data == null) {
return null
}
if (data.hasOwnProperty("productName") && data.hasOwnProperty("serialNumber")) {
resolve({
productName: data.productName,
serialNumber: data.serialNumber
})
}
}
}
} else {
reject({
message: '获取设备信息失败!'
})
}
})
return result
},
/** /**
* @name: 小采集器获取设备信息 * @name: 小采集器获取设备信息
* @param {*} * @param {*}
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2022-06-24 18:10:29 * @LastEditTime: 2022-06-27 09:01:21
* @LastEditors: error: git config user.name && git config user.email & please set dead value or install git * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js * @FilePath: \指纹系统\founder_vue\vue.config.js
...@@ -121,14 +121,14 @@ module.exports = { ...@@ -121,14 +121,14 @@ 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.143:8099", // 西藏 马 // target: "http://192.168.0.143:8099", // 西藏 马
// target: "http://192.168.0.130:8099", // 西藏 刘 // target: "http://192.168.0.130:8099", // 西藏 刘
// target: "http://172.18.109.63:8099", // 北京 张 // target: "http://172.18.109.63:8099", // 北京 张
target: "http://172.18.108.163:8099", // 北京 // target: "http://172.18.108.163:8099", // 北京
// target: "http://172.18.110.145:8099", // 北京 // target: "http://172.18.110.145:8099", // 北京
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
...@@ -140,14 +140,14 @@ module.exports = { ...@@ -140,14 +140,14 @@ module.exports = {
// target: "http://192.168.128.106:8765", // 湖南-王 // target: "http://192.168.128.106:8765", // 湖南-王
// target: "http://172.18.108.98:8765/", // 张 认定 // target: "http://172.18.108.98:8765/", // 张 认定
// 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.109:8765", // target: "http://192.168.128.109:8765",
// target: "http://172.18.109.63:8765", // 北京 张 // target: "http://172.18.109.63:8765", // 北京 张
// target: "http://192.168.0.165:8765", // 西藏 马 // target: "http://192.168.0.165:8765", // 西藏 马
// target: "http://192.168.0.107:8765", // 西藏 张 // target: "http://192.168.0.107:8765", // 西藏 张
// target: "http://172.18.109.63:8765", // 北京 张 // target: "http://172.18.109.63:8765", // 北京 张
// target: "http://172.18.108.163:8765", // 北京 // target: "http://172.18.108.163:8765", // 北京
target: "http://172.18.110.145:8765", // 北京 // target: "http://172.18.110.145:8765", // 北京
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