Commit 73983ef3 by 张超军

增加指纹传输的限制,展示正在传输的指纹数据

parent e968568d
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"vuex-persistedstate": "^4.0.0-beta.1", "vuex-persistedstate": "^4.0.0-beta.1",
"xlsx": "^0.16.9" "xlsx": "^0.16.9",
"zlib": "^1.0.5"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0", "@vue/cli-plugin-babel": "^4.5.0",
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-06-15 15:12:19 * @Date: 2021-06-15 15:12:19
* @LastEditTime: 2021-09-27 10:33:28 * @LastEditTime: 2022-10-18 16:36:51
* @LastEditors: Please set LastEditors * @LastEditors: zhangchaojun 893499851@qq.com
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \founder_vue\src\main.js * @FilePath: \founder_vue\src\main.js
*/ */
...@@ -25,13 +25,15 @@ Vue.prototype.$lrz = lrz ...@@ -25,13 +25,15 @@ Vue.prototype.$lrz = lrz
// Vue.prototype.$video = Video // Vue.prototype.$video = Video
//调用指纹采集接口 //调用指纹采集接口
import axios from 'axios' import axios from 'axios'
axios.defaults.retry = 9; axios.defaults.retry = 0;
axios.defaults.retryDelay = 1000; axios.defaults.retryDelay = 1000;
let count = 0
axios.interceptors.request.use( axios.interceptors.request.use(
function (config) { function (config) {
if (config.url == '/apiDelImg/dealImgStr') { if (config.url == '/apiDelImg/dealImgStr' || config.url == '/apiDelImg/saveFingerImg') {
sessionStorage.setItem('dealImgStr', 1) count++
sessionStorage.setItem('dealImgStr', count)
} }
console.log(1); console.log(1);
return config; return config;
...@@ -44,12 +46,14 @@ axios.interceptors.request.use( ...@@ -44,12 +46,14 @@ axios.interceptors.request.use(
); );
axios.interceptors.response.use(function(response) { axios.interceptors.response.use(function(response) {
if (response.config.url == '/apiDelImg/dealImgStr') { if (response.config.url == '/apiDelImg/dealImgStr' || response.config.url == '/apiDelImg/saveFingerImg') {
sessionStorage.setItem('dealImgStr', 0) count--
sessionStorage.setItem('dealImgStr', count)
console.log(0); console.log(0);
} }
return response; return response;
}, function axiosRetryInterceptor (err) { }, function axiosRetryInterceptor (err) {
/*
var config = err.config; var config = err.config;
// If config does not exist or the retry option is not set, reject // If config does not exist or the retry option is not set, reject
if (!config || !config.retry) return Promise.reject(err); if (!config || !config.retry) return Promise.reject(err);
...@@ -77,6 +81,7 @@ axios.interceptors.response.use(function(response) { ...@@ -77,6 +81,7 @@ axios.interceptors.response.use(function(response) {
return backoff.then(function () { return backoff.then(function () {
return axios(config); return axios(config);
}); });
*/
}); });
//其他vue组件中就可以this.$axios调用使用,vue3.0中不允许$axios,故改为$ajax //其他vue组件中就可以this.$axios调用使用,vue3.0中不允许$axios,故改为$ajax
Vue.prototype.$ajax = axios Vue.prototype.$ajax = axios
......
...@@ -2793,4 +2793,4 @@ $versionColor: var(--versionColor, #fff); // #000 ...@@ -2793,4 +2793,4 @@ $versionColor: var(--versionColor, #fff); // #000
img, button { img, button {
user-select: none; user-select: none;
} }
\ No newline at end of file
...@@ -718,6 +718,8 @@ import zoom from '@/utils/autosize.js'; ...@@ -718,6 +718,8 @@ import zoom from '@/utils/autosize.js';
export default { export default {
data () { data () {
return { return {
// 正在传输的指位
loadingFinger: [],
// 主题模式 // 主题模式
themeType: '深色', themeType: '深色',
// 实现展示上传进度 // 实现展示上传进度
...@@ -8317,10 +8319,50 @@ export default { ...@@ -8317,10 +8319,50 @@ export default {
if (this.fingerPic.length == 0) { if (this.fingerPic.length == 0) {
return; return;
} }
if (sessionStorage.getItem('dealImgStr') == 1) {
if (sessionStorage.getItem('dealImgStr') != 0) {
this.$message.warning('数据正在处理,请稍后再试!') this.$message.warning('数据正在处理,请稍后再试!')
let checkFinger = []
this.fingersRight.forEach(item => {
if (item.imgSrcR) {
checkFinger.push(item.code)
}
if (item.imgSrcL) {
checkFinger.push(item.code+10)
}
})
this.fingersLeft.forEach(item => {
if (item.imgSrcR) {
checkFinger.push(item.code)
}
if (item.imgSrcL) {
checkFinger.push(item.code+10)
}
})
axios({
method: 'post',
url: '/apiDelImg/getLackPosition',
data: {
barcode: this.rybh,
fingerPosition: checkFinger
}
}).then(res => {
// console.log(res)
if (res.data.tips.length > 0) {
self.loadingFinger = res.data.tips.join('、')
this.$notify({
customClass: 'loadingFinger',
title: '以下指纹数据正在传输,请稍后再试,或重采',
type: 'info',
dangerouslyUseHTMLString: true,
message: `<p style='color: teal; font-size: 14px'>${self.loadingFinger}</p>`,
duration: 0
});
}
})
return; return;
} }
this.fingersLeftNo = [] this.fingersLeftNo = []
this.fingersRightNo = [] this.fingersRightNo = []
if (this.rGdzw.length > 0 || this.rPmzw.length > 0) { if (this.rGdzw.length > 0 || this.rPmzw.length > 0) {
...@@ -9570,3 +9612,8 @@ export default { ...@@ -9570,3 +9612,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import "./fingerprint.scss"; @import "./fingerprint.scss";
</style> </style>
<style>
.loadingFinger {
width: 414px;
}
</style>
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
let self = this let self = this
axios({ axios({
method: 'post', method: 'post',
url: '/apizzwxxk/personstore/person/list', url: '/apizzwxxk/personstore/person',
params: { params: {
zwbh: self.htmlTitle zwbh: self.htmlTitle
} }
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-06-15 15:12:19 * @Date: 2021-06-15 15:12:19
* @LastEditTime: 2022-08-22 16:12:49 * @LastEditTime: 2022-10-18 16:00:44
* @LastEditors: zhangchaojun 893499851@qq.com * @LastEditors: zhangchaojun 893499851@qq.com
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \founder_vue\vue.config.js * @FilePath: \founder_vue\vue.config.js
...@@ -138,7 +138,7 @@ module.exports = { ...@@ -138,7 +138,7 @@ module.exports = {
"/apiDelImg": { "/apiDelImg": {
// target: "http://47.92.226.24:8091/", //统一的请求头部每次修改都要重启才会生效 // target: "http://47.92.226.24:8091/", //统一的请求头部每次修改都要重启才会生效
// target: "http://192.168.128.105:8091", //新系统 // target: "http://192.168.128.105:8091", //新系统
target: "http://172.18.116.16:8091", //新系统 target: "http://172.18.116.20:8091", //新系统
// target: "http://127.0.0.1:8091", //新系统 // target: "http://127.0.0.1:8091", //新系统
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
......
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