Commit 5c5e6e93 by liyuhang19990520

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents 222985a6 278dffb3
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:58:13 * @Date: 2021-09-07 09:58:13
* @LastEditTime: 2021-11-15 13:19:50 * @LastEditTime: 2021-11-15 21:12:58
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\App.vue * @FilePath: \指纹系统\founder_vue\src\App.vue
--> -->
<template> <template>
<div id="app"> <div id="app">
<div class="boxShadow"></div>
<router-view v-wechat-title="$route.meta.title"></router-view> <router-view v-wechat-title="$route.meta.title"></router-view>
</div> </div>
</template> </template>
...@@ -18,10 +17,11 @@ import zoom from "./utils/autosize"; ...@@ -18,10 +17,11 @@ import zoom from "./utils/autosize";
export default {}; export default {};
</script> </script>
<style lang="scss" scoped> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "assets/styles/main.scss"; @import "assets/styles/main.scss";
#app { #app {
// height: 800px;
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -1121,6 +1121,9 @@ div { ...@@ -1121,6 +1121,9 @@ div {
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
&:nth-child(7) {
margin-right: 0;
}
&:active { &:active {
background: #055fe7; background: #055fe7;
box-shadow: 4px 4px 4px 0px rgba(193, 216, 251, 0.8), box-shadow: 4px 4px 4px 0px rgba(193, 216, 251, 0.8),
...@@ -1131,6 +1134,7 @@ div { ...@@ -1131,6 +1134,7 @@ div {
.light_dbd { .light_dbd {
width: 128px; width: 128px;
height: 40px; height: 40px;
margin-right: 0;
} }
.line { .line {
width: 1px; width: 1px;
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-09-09 09:28:46 * @Date: 2021-09-09 09:28:46
* @LastEditTime: 2021-11-15 10:07:43 * @LastEditTime: 2021-11-15 15:07:25
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\cxyrd\LTz.vue * @FilePath: \指纹系统\founder_vue\src\views\cxyrd\LTz.vue
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
<div class="content"> <div class="content">
<el-slider class="range-narrow" id="input-range-remove-white-distance" v-model="inputRemoveWhiteRange" :min="0" :max="255"></el-slider> <el-slider class="range-narrow" id="input-range-remove-white-distance" v-model="inputRemoveWhiteRange" :min="0" :max="255"></el-slider>
<!-- <input class="range-narrow" id="input-range-remove-white-distance" type="range" min="0" :value="inputRemoveWhiteRange" max="255" /> --> <!-- <input class="range-narrow" id="input-range-remove-white-distance" type="range" min="0" :value="inputRemoveWhiteRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputRemoveWhiteRange"> <input class="qb_v" type="text" v-model.number="inputRemoveWhiteRange">
</div> </div>
</div> </div>
<!-- 滤色器弹框 --> <!-- 滤色器弹框 -->
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
<div class="content"> <div class="content">
<el-slider class="range-narrow" id="input-range-color-filter-value" v-model="inputColorFilterRange" :min="0" :max="255"></el-slider> <el-slider class="range-narrow" id="input-range-color-filter-value" v-model="inputColorFilterRange" :min="0" :max="255"></el-slider>
<!-- <input class="range-narrow" id="input-range-color-filter-value" type="range" min="0" :value="inputColorFilterRange" max="255" /> --> <!-- <input class="range-narrow" id="input-range-color-filter-value" type="range" min="0" :value="inputColorFilterRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputColorFilterRange"> <input class="qb_v" type="text" v-model.number="inputColorFilterRange">
</div> </div>
</div> </div>
<!-- 正片叠底弹框 --> <!-- 正片叠底弹框 -->
...@@ -438,13 +438,13 @@ ...@@ -438,13 +438,13 @@
<div class="content"> <div class="content">
<el-slider class="range-narrow" id="input-range-brightness-value" v-model="inputBrightnessRange" :min="-255" :max="255"></el-slider> <el-slider class="range-narrow" id="input-range-brightness-value" v-model="inputBrightnessRange" :min="-255" :max="255"></el-slider>
<!-- <input class="range-narrow" id="input-range-brightness-value" type="range" min="-255" :value="inputBrightnessRange" max="255" /> --> <!-- <input class="range-narrow" id="input-range-brightness-value" type="range" min="-255" :value="inputBrightnessRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputBrightnessRange"> <input class="qb_v" type="text" v-model.number="inputBrightnessRange">
</div> </div>
<div class="title">对比度</div> <div class="title">对比度</div>
<div class="content"> <div class="content">
<el-slider class="range-narrow" id="input-range-contrast-value" v-model="inputContrastRange" :min="0" :max="255"></el-slider> <el-slider class="range-narrow" id="input-range-contrast-value" v-model="inputContrastRange" :min="0" :max="255"></el-slider>
<!-- <input class="range-narrow" id="input-range-contrast-value" type="range" min="0" :value="inputContrastRange" max="255" /> --> <!-- <input class="range-narrow" id="input-range-contrast-value" type="range" min="0" :value="inputContrastRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputContrastRange"> <input class="qb_v" type="text" v-model.number="inputContrastRange">
</div> </div>
</div> </div>
</div> </div>
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 14:39:52 * @Date: 2021-09-07 14:39:52
* @LastEditTime: 2021-10-29 09:16:56 * @LastEditTime: 2021-11-15 11:13:36
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\main.js * @FilePath: \指纹系统\founder_vue\src\main.js
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-15 19:29:50 * @LastEditTime: 2021-11-15 21:11:46
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\plugins\axios.js * @FilePath: \指纹系统\founder_vue\src\plugins\axios.js
...@@ -16,6 +16,7 @@ import store from "../store"; ...@@ -16,6 +16,7 @@ import store from "../store";
import { Loading } from 'element-ui'; import { Loading } from 'element-ui';
var loadingIndex = 0; var loadingIndex = 0;
var loadingBoo; var loadingBoo;
var timer;
// Full config: https://github.com/axios/axios#request-config // Full config: https://github.com/axios/axios#request-config
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || ''; // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
...@@ -64,10 +65,11 @@ _axios.interceptors.response.use( ...@@ -64,10 +65,11 @@ _axios.interceptors.response.use(
NProgress.done(); NProgress.done();
if (loadingBoo) loadingIndex--; if (loadingBoo) loadingIndex--;
if (loadingIndex == 0) { if (loadingIndex == 0) {
setTimeout(() => { clearTimeout(timer)
timer = setTimeout(() => {
loading && loading.close(); loading && loading.close();
loading = null loading = null
}, 1000); }, 1200);
} }
if (response.data.code === 401) { if (response.data.code === 401) {
localStorage.removeItem("token"); //删除名称为“token”的信息。 localStorage.removeItem("token"); //删除名称为“token”的信息。
...@@ -81,10 +83,11 @@ _axios.interceptors.response.use( ...@@ -81,10 +83,11 @@ _axios.interceptors.response.use(
NProgress.done(); NProgress.done();
if (loadingBoo) loadingIndex--; if (loadingBoo) loadingIndex--;
if (loadingIndex == 0) { if (loadingIndex == 0) {
clearTimeout(timer)
setTimeout(() => { setTimeout(() => {
loading && loading.close(); loading && loading.close();
loading = null loading = null;
}, 500); }, 1200);
} }
// Do something with response error // Do something with response error
return Promise.reject(error); return Promise.reject(error);
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-11 16:58:07 * @LastEditTime: 2021-11-15 20:07:17
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\router\index.js * @FilePath: \指纹系统\founder_vue\src\router\index.js
...@@ -68,8 +68,10 @@ const router = new VueRouter({ ...@@ -68,8 +68,10 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(from); console.log(from);
if(from.name === 'ryzwbj' || from.name === 'ajzwbj') { if(from.name === 'ryzwbj' || from.name === 'ajzwbj') {
// 清空session setTimeout(() => {
sessionStorage.clear() // 清空session
sessionStorage.clear()
}, 1000);
} }
next() next()
}) })
......
...@@ -559,8 +559,10 @@ export default { ...@@ -559,8 +559,10 @@ export default {
}, },
closeXzry (val) { closeXzry (val) {
console.log("新增人员关闭", val); console.log("新增人员关闭", val);
// 增加毛玻璃
this.$bus.emit('isBlur', val)
this.isShowXzry = val; this.isShowXzry = val;
this.search(); // this.search();
}, },
// 时间格式化 // 时间格式化
dateTimeFormat (row, colnum) { dateTimeFormat (row, colnum) {
...@@ -725,6 +727,7 @@ export default { ...@@ -725,6 +727,7 @@ export default {
this.isShowGz = true; this.isShowGz = true;
}, },
closeGz (val) { closeGz (val) {
this.$bus.emit('isBlur', val)
console.log("关注关闭", val); console.log("关注关闭", val);
this.isShowGz = val; this.isShowGz = val;
this.search(); this.search();
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 09:42:07 * @Date: 2021-10-22 09:42:07
* @LastEditTime: 2021-11-13 11:21:59 * @LastEditTime: 2021-11-15 16:11:50
* @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\ryzwbjLeft.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
...@@ -71,7 +71,12 @@ ...@@ -71,7 +71,12 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
// 取消上一次请求
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
export default { export default {
data () { data () {
return { return {
...@@ -134,6 +139,9 @@ export default { ...@@ -134,6 +139,9 @@ export default {
image: null image: null
} }
], ],
// 加载动画
loading: null,
timer: null,
} }
}, },
computed: { computed: {
...@@ -162,6 +170,7 @@ export default { ...@@ -162,6 +170,7 @@ export default {
* 获取案件指纹原图 * 获取案件指纹原图
*/ */
getCaseOrigin (seq) { getCaseOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$store.commit('zwbj/setSeq', seq) this.$store.commit('zwbj/setSeq', seq)
let self = this let self = this
this.$axios({ this.$axios({
...@@ -172,7 +181,8 @@ export default { ...@@ -172,7 +181,8 @@ export default {
barcode: self.barcode, barcode: self.barcode,
seqno: self.seq seqno: self.seq
}, },
loading: false loading: false,
cancelToken: source.token
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code === 0) { if (res.data.code === 0) {
...@@ -183,6 +193,11 @@ export default { ...@@ -183,6 +193,11 @@ export default {
} }
} }
}) })
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
/** /**
* 获取案件指纹 * 获取案件指纹
......
...@@ -1454,6 +1454,7 @@ $transOrigin: var(--transOrigin, 0px, 0px); ...@@ -1454,6 +1454,7 @@ $transOrigin: var(--transOrigin, 0px, 0px);
.content { .content {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 10px;
} }
.title { .title {
font-size: 14px; font-size: 14px;
...@@ -1469,6 +1470,22 @@ $transOrigin: var(--transOrigin, 0px, 0px); ...@@ -1469,6 +1470,22 @@ $transOrigin: var(--transOrigin, 0px, 0px);
height: 20px; height: 20px;
} }
} }
/deep/ .el-slider__runway {
width: 190px;
height: 3px;
margin: 0;
background-color: #eeeeee;
}
/deep/ .el-slider__bar {
height: 3px;
background-color: #055fe7;
}
/deep/ .el-slider__button {
width: 10px;
height: 10px;
background: #ffffff;
border: 2px solid #055fe7;
}
} }
.options-line { .options-line {
width: 304px; width: 304px;
...@@ -1507,6 +1524,22 @@ $transOrigin: var(--transOrigin, 0px, 0px); ...@@ -1507,6 +1524,22 @@ $transOrigin: var(--transOrigin, 0px, 0px);
} }
} }
} }
/deep/ .el-slider__runway {
width: 200px;
height: 3px;
margin: 0;
background-color: #eeeeee;
}
/deep/ .el-slider__bar {
height: 3px;
background-color: #055fe7;
}
/deep/ .el-slider__button {
width: 10px;
height: 10px;
background: #ffffff;
border: 2px solid #055fe7;
}
.brightness { .brightness {
margin-top: 10px; margin-top: 10px;
margin-left: 32px; margin-left: 32px;
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-14 23:27:33 * @LastEditTime: 2021-11-15 20:06:14
* @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
...@@ -246,7 +246,8 @@ ...@@ -246,7 +246,8 @@
<div class="remove-white" v-show="optionsRemoveWhite"> <div class="remove-white" v-show="optionsRemoveWhite">
<div class="title">去白</div> <div class="title">去白</div>
<div class="content"> <div class="content">
<input class="range-narrow" id="input-range-remove-white-distance" type="range" min="0" :value="inputRemoveWhiteRange" max="255" /> <!-- <input class="range-narrow" id="input-range-remove-white-distance" type="range" min="0" :value="inputRemoveWhiteRange" max="255" /> -->
<el-slider class="range-narrow" id="input-range-remove-white-distance" v-model="inputRemoveWhiteRange" :min="0" :max="255"></el-slider>
<input class="qb_v" type="text" v-model="inputRemoveWhiteRange"> <input class="qb_v" type="text" v-model="inputRemoveWhiteRange">
</div> </div>
</div> </div>
...@@ -268,24 +269,27 @@ ...@@ -268,24 +269,27 @@
<div class="color-filter"> <div class="color-filter">
<div class="title">滤色器</div> <div class="title">滤色器</div>
<div class="content"> <div class="content">
<input class="range-narrow" id="input-range-color-filter-value" type="range" min="0" :value="inputColorFilterRange" max="255" /> <!-- <input class="range-narrow" id="input-range-color-filter-value" type="range" min="0" :value="inputColorFilterRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputColorFilterRange"> <el-slider class="range-narrow" id="input-range-color-filter-value" v-model.number="inputColorFilterRange" :min="0" :max="255"></el-slider>
<input min="0" max="255" class="qb_v" type="text" v-model.number="inputColorFilterRange">
</div> </div>
</div> </div>
<!-- 亮度 --> <!-- 亮度 -->
<div class="brightness"> <div class="brightness">
<div class="title">亮度</div> <div class="title">亮度</div>
<div class="content"> <div class="content">
<input class="range-narrow" id="input-range-brightness-value" type="range" min="-255" :value="inputBrightnessRange" max="255" /> <!-- <input class="range-narrow" id="input-range-brightness-value" type="range" min="-255" :value="inputBrightnessRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputBrightnessRange"> <el-slider class="range-narrow" id="input-range-brightness-value" v-model.number="inputBrightnessRange" :min="-255" :max="255"></el-slider>
<input class="qb_v" type="text" v-model.number="inputBrightnessRange">
</div> </div>
</div> </div>
<!-- 对比度 --> <!-- 对比度 -->
<div class="contrast-ratio"> <div class="contrast-ratio">
<div class="title">对比度</div> <div class="title">对比度</div>
<div class="content"> <div class="content">
<input class="range-narrow" id="input-range-contrast-value" type="range" min="0" :value="inputContrastRange" max="255" /> <!-- <input class="range-narrow" id="input-range-contrast-value" type="range" min="0" :value="inputContrastRange" max="255" /> -->
<input class="qb_v" type="text" v-model="inputContrastRange"> <el-slider class="range-narrow" id="input-range-contrast-value" v-model.number="inputContrastRange" :min="0" :max="255"></el-slider>
<input class="qb_v" type="text" v-model.number="inputContrastRange">
</div> </div>
</div> </div>
</div> </div>
...@@ -430,9 +434,9 @@ export default { ...@@ -430,9 +434,9 @@ export default {
// 是否选择了去除白色 // 是否选择了去除白色
isRemoveWhiteActive: false, isRemoveWhiteActive: false,
// 去白值 // 去白值
inputRemoveWhiteRange: 10, inputRemoveWhiteRange: 0,
// 去白值--target // 去白值--target
inputRemoveWhiteRange2: 10, inputRemoveWhiteRange2: 0,
// 是否展示去白下拉框 // 是否展示去白下拉框
optionsRemoveWhite: false, optionsRemoveWhite: false,
// 滤色器选项框 // 滤色器选项框
...@@ -440,9 +444,9 @@ export default { ...@@ -440,9 +444,9 @@ export default {
// 是否选择了滤色器 // 是否选择了滤色器
isColorFilterActive: false, isColorFilterActive: false,
// 滤色器色值 // 滤色器色值
inputColorFilterRange: 45, inputColorFilterRange: 0,
// 滤色器色值---target // 滤色器色值---target
inputColorFilterRange2: 45, inputColorFilterRange2: 0,
// 是否选择了正片叠底 // 是否选择了正片叠底
isMultiplyActive: false, isMultiplyActive: false,
// 是否展示正片叠底框 // 是否展示正片叠底框
...@@ -454,9 +458,9 @@ export default { ...@@ -454,9 +458,9 @@ export default {
// 是否选择了亮度 // 是否选择了亮度
isBrightnessActive: false, isBrightnessActive: false,
// 亮度 // 亮度
inputBrightnessRange: 100, inputBrightnessRange: 0,
// 亮度 --- target // 亮度 --- target
inputBrightnessRange2: 100, inputBrightnessRange2: 0,
// 是否展示亮度弹窗 // 是否展示亮度弹窗
optionsBrightness: false, optionsBrightness: false,
// 源数据/目标数据切换 // 源数据/目标数据切换
...@@ -543,6 +547,8 @@ export default { ...@@ -543,6 +547,8 @@ export default {
//特征点原点的x和y的坐标 //特征点原点的x和y的坐标
originX: 0, originX: 0,
originY: 0, originY: 0,
// 记录session的个数
sessionCount: 0
}; };
}, },
computed: { computed: {
...@@ -705,7 +711,7 @@ export default { ...@@ -705,7 +711,7 @@ export default {
function applyOrRemoveFilter (applying, type, options) { function applyOrRemoveFilter (applying, type, options) {
if (applying) { if (applying) {
imageEditor.applyFilter(type, options).then(function (result) { imageEditor.applyFilter(type, options).then(function (result) {
console.log(result); // console.log(result);
}); });
} else { } else {
imageEditor.removeFilter(type); imageEditor.removeFilter(type);
...@@ -1141,15 +1147,16 @@ export default { ...@@ -1141,15 +1147,16 @@ export default {
// 滑动条去除白色 // 滑动条去除白色
$inputRangeRemoveWhiteDistance.on('change', function () { $inputRangeRemoveWhiteDistance.on('change', function () {
self.inputRemoveWhiteRange = this.value self.inputRemoveWhiteRange = Number(this.value)
applyOrRemoveFilter(true, 'removeColor', { applyOrRemoveFilter(true, 'removeColor', {
distance: parseInt(this.value, 10) / 255, distance: parseInt(this.value, 10) / 255,
}); });
}); });
// 滑动条滤色 // 滑动条滤色
$inputRangeColorFilterValue.on('change', function () { $inputRangeColorFilterValue.on('change', function (value) {
self.inputColorFilterRange = this.value console.log(value);
self.inputColorFilterRange = Number(this.value)
applyOrRemoveFilter(true, 'removeColor', { applyOrRemoveFilter(true, 'removeColor', {
distance: this.value / 255, distance: this.value / 255,
}); });
...@@ -1230,8 +1237,8 @@ export default { ...@@ -1230,8 +1237,8 @@ export default {
preTzd.forEach((item, index) => { preTzd.forEach((item, index) => {
self.tzdArr.push({ self.tzdArr.push({
id: self.tzdId, id: self.tzdId,
x: item.zwzxd_tzxzb, x: item.zwtzd_tzxzb,
y: item.zwzxd_tzyzb, y: item.zwtzd_tzyzb,
angle: item.zwtzd_tzfx angle: item.zwtzd_tzfx
}) })
...@@ -1252,8 +1259,8 @@ export default { ...@@ -1252,8 +1259,8 @@ export default {
$('.tzdDom .direction').css('height', '2px') $('.tzdDom .direction').css('height', '2px')
$('.tzdDom .direction').css('background-color', '#FFFD0F') $('.tzdDom .direction').css('background-color', '#FFFD0F')
$(`#tzd${self.tzdId}`).css("left", (item.zwzxd_tzxzb - 4) / self.zoomLevel + "px"); $(`#tzd${self.tzdId}`).css("left", (item.zwtzd_tzxzb - 4) / self.zoomLevel + "px");
$(`#tzd${self.tzdId}`).css("top", (item.zwzxd_tzyzb - 4) / self.zoomLevel + "px"); $(`#tzd${self.tzdId}`).css("top", (item.zwtzd_tzyzb - 4) / self.zoomLevel + "px");
$(`#tzd${self.tzdId}`).css("box-sizing", "border-box"); $(`#tzd${self.tzdId}`).css("box-sizing", "border-box");
$("#tzd" + self.tzdId).css("transform", `rotate(${item.zwtzd_tzfx}deg)`); $("#tzd" + self.tzdId).css("transform", `rotate(${item.zwtzd_tzfx}deg)`);
...@@ -1426,8 +1433,8 @@ export default { ...@@ -1426,8 +1433,8 @@ export default {
tzdall_shou.push({ tzdall_shou.push({
id: item.id, id: item.id,
zwtzd_tzfx: item.angle, zwtzd_tzfx: item.angle,
zwzxd_tzxzb: item.x, zwtzd_tzxzb: item.x,
zwzxd_tzyzb: item.y zwtzd_tzyzb: item.y
}) })
}) })
self.$store.commit('zwbj/setTzdall', tzdall_shou) self.$store.commit('zwbj/setTzdall', tzdall_shou)
...@@ -1662,8 +1669,8 @@ export default { ...@@ -1662,8 +1669,8 @@ export default {
self.tzdArr.forEach(item => { self.tzdArr.forEach(item => {
self.pretzdall.push({ self.pretzdall.push({
zwtzd_tzfx: item.angle, zwtzd_tzfx: item.angle,
zwzxd_tzxzb: item.x, zwtzd_tzxzb: item.x,
zwzxd_tzyzb: item.y zwtzd_tzyzb: item.y
}) })
}) })
} }
...@@ -1781,8 +1788,8 @@ export default { ...@@ -1781,8 +1788,8 @@ export default {
$('.auto_tzdDom .direction').css('height', '2px') $('.auto_tzdDom .direction').css('height', '2px')
$('.auto_tzdDom .direction').css('background-color', '#FFFD0F') $('.auto_tzdDom .direction').css('background-color', '#FFFD0F')
$(`#tzd${self.tzdId}`).css("left", (item.zwzxd_tzxzb - 4) / self.zoomLevel + "px"); $(`#tzd${self.tzdId}`).css("left", (item.zwtzd_tzxzb - 4) / self.zoomLevel + "px");
$(`#tzd${self.tzdId}`).css("top", (item.zwzxd_tzyzb - 4) / self.zoomLevel + "px"); $(`#tzd${self.tzdId}`).css("top", (item.zwtzd_tzyzb - 4) / self.zoomLevel + "px");
$(`#tzd${self.tzdId}`).css("box-sizing", "border-box"); $(`#tzd${self.tzdId}`).css("box-sizing", "border-box");
$("#tzd" + self.tzdId).css("transform", `rotate(${item.zwtzd_tzfx}deg)`); $("#tzd" + self.tzdId).css("transform", `rotate(${item.zwtzd_tzfx}deg)`);
self.tzdId++ self.tzdId++
...@@ -1814,8 +1821,8 @@ export default { ...@@ -1814,8 +1821,8 @@ export default {
$('.auto_tzdDom .direction').css('height', '2px') $('.auto_tzdDom .direction').css('height', '2px')
$('.auto_tzdDom .direction').css('background-color', '#FFFD0F') $('.auto_tzdDom .direction').css('background-color', '#FFFD0F')
$(`#${item.id}`).css("left", (item.zwzxd_tzxzb - 4) / self.zoomLevel + "px"); $(`#${item.id}`).css("left", (item.zwtzd_tzxzb - 4) / self.zoomLevel + "px");
$(`#${item.id}`).css("top", (item.zwzxd_tzyzb - 4) / self.zoomLevel + "px"); $(`#${item.id}`).css("top", (item.zwtzd_tzyzb - 4) / self.zoomLevel + "px");
$(`#${item.id}`).css("box-sizing", "border-box"); $(`#${item.id}`).css("box-sizing", "border-box");
$("#" + item.id).css("transform", `rotate(${item.zwtzd_tzfx}deg)`); $("#" + item.id).css("transform", `rotate(${item.zwtzd_tzfx}deg)`);
}) })
...@@ -2218,7 +2225,7 @@ export default { ...@@ -2218,7 +2225,7 @@ export default {
this.imageEditor.applyFilter('blendColor', { this.imageEditor.applyFilter('blendColor', {
color: self.multiplyColorpicker.getColor(), color: self.multiplyColorpicker.getColor(),
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('正片叠底') self.historys.push('正片叠底')
} else { } else {
...@@ -2270,7 +2277,7 @@ export default { ...@@ -2270,7 +2277,7 @@ export default {
useAlpha: false, useAlpha: false,
distance: parseInt(self.inputRemoveWhiteRange, 10) / 255, distance: parseInt(self.inputRemoveWhiteRange, 10) / 255,
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('去白') self.historys.push('去白')
} else { } else {
...@@ -2321,7 +2328,7 @@ export default { ...@@ -2321,7 +2328,7 @@ export default {
mode: 'diff', mode: 'diff',
color: self.blendColorpicker.getColor(), color: self.blendColorpicker.getColor(),
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('差异化') self.historys.push('差异化')
} else { } else {
...@@ -2368,7 +2375,7 @@ export default { ...@@ -2368,7 +2375,7 @@ export default {
this.isInvertActive = !this.isInvertActive this.isInvertActive = !this.isInvertActive
if (this.isInvertActive) { if (this.isInvertActive) {
this.imageEditor.applyFilter('Invert', null).then(function (result) { this.imageEditor.applyFilter('Invert', null).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('反相') self.historys.push('反相')
} else { } else {
...@@ -2414,7 +2421,7 @@ export default { ...@@ -2414,7 +2421,7 @@ export default {
this.isEmbossActive = !this.isEmbossActive this.isEmbossActive = !this.isEmbossActive
if (this.isEmbossActive) { if (this.isEmbossActive) {
this.imageEditor.applyFilter('Emboss', null).then(function (result) { this.imageEditor.applyFilter('Emboss', null).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('浮雕') self.historys.push('浮雕')
} else { } else {
...@@ -2460,7 +2467,7 @@ export default { ...@@ -2460,7 +2467,7 @@ export default {
this.isSharpenActive = !this.isSharpenActive this.isSharpenActive = !this.isSharpenActive
if (this.isSharpenActive) { if (this.isSharpenActive) {
this.imageEditor.applyFilter('Sharpen', null).then(function (result) { this.imageEditor.applyFilter('Sharpen', null).then(function (result) {
console.log(result); // console.log(result);
}); });
} else { } else {
this.imageEditor.removeFilter('Sharpen'); this.imageEditor.removeFilter('Sharpen');
...@@ -2582,7 +2589,7 @@ export default { ...@@ -2582,7 +2589,7 @@ export default {
this.isVintageActive = !this.isVintageActive this.isVintageActive = !this.isVintageActive
if (this.isVintageActive) { if (this.isVintageActive) {
this.imageEditor.applyFilter('vintage', null).then(function (result) { this.imageEditor.applyFilter('vintage', null).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('棕褐色') self.historys.push('棕褐色')
} else { } else {
...@@ -2628,7 +2635,7 @@ export default { ...@@ -2628,7 +2635,7 @@ export default {
this.isGrayActive = !this.isGrayActive this.isGrayActive = !this.isGrayActive
if (this.isGrayActive) { if (this.isGrayActive) {
this.imageEditor.applyFilter('Grayscale', null).then(function (result) { this.imageEditor.applyFilter('Grayscale', null).then(function (result) {
console.log(result); // console.log(result);
}); });
self.historys.push('灰度') self.historys.push('灰度')
} else { } else {
...@@ -2653,8 +2660,8 @@ export default { ...@@ -2653,8 +2660,8 @@ export default {
self.tzdArr.forEach(item => { self.tzdArr.forEach(item => {
self.tzdall.push({ self.tzdall.push({
zwtzd_tzfx: item.angle, zwtzd_tzfx: item.angle,
zwzxd_tzxzb: item.x, zwtzd_tzxzb: item.x,
zwzxd_tzyzb: item.y zwtzd_tzyzb: item.y
}) })
}) })
} }
...@@ -2684,9 +2691,12 @@ export default { ...@@ -2684,9 +2691,12 @@ export default {
console.log(res); console.log(res);
if (res.data.message == 'success') { if (res.data.message == 'success') {
self.$message.success('保存成功!') self.$message.success('保存成功!')
// 记录session保存的个数
self.sessionCount++
} }
}) })
} else if (self.saveType == '全部指位特征') { } else if (self.saveType == '全部指位特征') {
let sessionArr = []
let allTZData = [] let allTZData = []
console.log('111'); console.log('111');
sessionStorage.setItem(self.seq, JSON.stringify(self.preTzdArr)) sessionStorage.setItem(self.seq, JSON.stringify(self.preTzdArr))
...@@ -2694,10 +2704,12 @@ export default { ...@@ -2694,10 +2704,12 @@ export default {
var sessionKeys = Object.keys(sessionStorage) var sessionKeys = Object.keys(sessionStorage)
for (var i = 0; i < sessionKeys.length; i++) { for (var i = 0; i < sessionKeys.length; i++) {
//可以对key 进行分析从而决定是否要删除sessionStorage 里的缓存 // 可以对key 进行分析从而决定是否要删除sessionStorage 里的缓存
console.log(sessionKeys[i], sessionStorage.getItem(sessionKeys[i])) console.log(sessionKeys[i], sessionStorage.getItem(sessionKeys[i]))
// 去掉auto // 去掉auto
if (sessionKeys[i][0] === 'a') { if (sessionKeys[i][0] === 'a') {
// 记录session保存的个数
sessionArr.push(sessionStorage.getItem(sessionKeys[i]))
for (var j = 0; j < sessionKeys.length; j++) { for (var j = 0; j < sessionKeys.length; j++) {
if (sessionKeys[j] == sessionKeys[i].substring(4, sessionKeys[i].length)) { if (sessionKeys[j] == sessionKeys[i].substring(4, sessionKeys[i].length)) {
console.log(JSON.parse(sessionStorage.getItem(sessionKeys[j]))); console.log(JSON.parse(sessionStorage.getItem(sessionKeys[j])));
...@@ -2729,7 +2741,16 @@ export default { ...@@ -2729,7 +2741,16 @@ export default {
this.$axios({ this.$axios({
method: 'post', method: 'post',
url: '/api/upload/trait/allperson?barcode=' + self.barcode, url: '/api/upload/trait/allperson?barcode=' + self.barcode,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
data: JSON.stringify(allTZData) data: JSON.stringify(allTZData)
}).then(res => {
if (res.data.code === 0) {
self.$message.success('保存成功!')
// 计算session的个数
self.sessionCount = self.sessionCount + Number(sessionArr.length)
}
}) })
console.log(allTZData); console.log(allTZData);
} }
...@@ -3525,7 +3546,7 @@ export default { ...@@ -3525,7 +3546,7 @@ export default {
this.imageEditor.applyFilter('removeColor', { this.imageEditor.applyFilter('removeColor', {
distance: parseInt(newValue, 10) / 255, distance: parseInt(newValue, 10) / 255,
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
}, },
// 对比度 // 对比度
...@@ -3533,21 +3554,22 @@ export default { ...@@ -3533,21 +3554,22 @@ export default {
this.imageEditor.applyFilter('Contrast', { this.imageEditor.applyFilter('Contrast', {
contrast: parseInt(newValue, 10) / 255, contrast: parseInt(newValue, 10) / 255,
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
}, },
inputColorFilterRange (newValue, oldValue) { inputColorFilterRange (newValue, oldValue) {
console.log(newValue);
this.imageEditor.applyFilter('removeColor', { this.imageEditor.applyFilter('removeColor', {
distance: parseInt(newValue, 10) / 255, distance: parseInt(newValue, 10) / 255,
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
}, },
inputBrightnessRange (newValue, oldValue) { inputBrightnessRange (newValue, oldValue) {
this.imageEditor.applyFilter('brightness', { this.imageEditor.applyFilter('brightness', {
brightness: parseInt(newValue, 10) / 255, brightness: parseInt(newValue, 10) / 255,
}).then(function (result) { }).then(function (result) {
console.log(result); // console.log(result);
}); });
}, },
isEnlarge (newValue, oldValue) { isEnlarge (newValue, oldValue) {
...@@ -3640,6 +3662,24 @@ export default { ...@@ -3640,6 +3662,24 @@ export default {
} }
}, },
}, },
beforeDestroy () {
let sessionArr = []
var sessionKeys = Object.keys(sessionStorage)
for (var i = 0; i < sessionKeys.length; i++) {
//可以对key 进行分析从而决定是否要删除sessionStorage 里的缓存
console.log(sessionKeys[i], sessionStorage.getItem(sessionKeys[i]))
if (sessionKeys[i].substring(0,4) == 'auto') {
sessionArr.push(sessionStorage.getItem(sessionKeys[i]))
}
}
console.log(sessionArr);
console.log(this.sessionCount);
if (sessionArr.length == this.sessionCount) {
return
} else {
this.$message.error('当前页面有未保存的指位!')
}
},
} }
</script> </script>
......
...@@ -798,8 +798,9 @@ $directionRotate: var(--directionRotate, 0deg); ...@@ -798,8 +798,9 @@ $directionRotate: var(--directionRotate, 0deg);
height: 640px; height: 640px;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
justify-content: center; filter: "FlipV";
align-items: center; // justify-content: center;
// align-items: center;
.tui-image-editor { .tui-image-editor {
width: 640px !important; width: 640px !important;
height: 640px !important; height: 640px !important;
...@@ -811,9 +812,9 @@ $directionRotate: var(--directionRotate, 0deg); ...@@ -811,9 +812,9 @@ $directionRotate: var(--directionRotate, 0deg);
max-width: 640px !important; max-width: 640px !important;
height: 100%; height: 100%;
width: auto !important; width: auto !important;
display: flex !important; // display: flex !important;
justify-content: center !important; // justify-content: center !important;
align-items: center !important; // align-items: center !important;
} }
.blc { .blc {
position: absolute; position: absolute;
...@@ -2131,6 +2132,21 @@ $directionRotate: var(--directionRotate, 0deg); ...@@ -2131,6 +2132,21 @@ $directionRotate: var(--directionRotate, 0deg);
top: 128px; top: 128px;
right: 47px; right: 47px;
} }
/deep/ .el-slider__runway {
width: 142px;
height: 3px;
margin: 0;
}
/deep/ .el-slider__bar {
height: 3px;
background-color: #055fe7;
}
/deep/ .el-slider__button {
width: 10px;
height: 10px;
background: #ffffff;
border: 2px solid #055fe7;
}
.remove-white { .remove-white {
position: absolute; position: absolute;
top: 150px; top: 150px;
...@@ -2244,7 +2260,4 @@ $directionRotate: var(--directionRotate, 0deg); ...@@ -2244,7 +2260,4 @@ $directionRotate: var(--directionRotate, 0deg);
input[type="range"]::-webkit-slider-thumb:active { input[type="range"]::-webkit-slider-thumb:active {
transform: scale(1.6); transform: scale(1.6);
} }
} }
// /deep/.el-select-dropdown__item { \ No newline at end of file
// padding-left: 20px !important;
// }
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-13 14:49:54 * @LastEditTime: 2021-11-15 19:17:49
* @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
...@@ -1093,9 +1093,9 @@ export default { ...@@ -1093,9 +1093,9 @@ export default {
console.log("flipY: ", status.flipY); console.log("flipY: ", status.flipY);
console.log("angle: ", status.angle); console.log("angle: ", status.angle);
if (status.flipX) { if (status.flipX) {
$(".tzdDrawing").css("transform", "rotateY(180deg)"); $(".tzdDrawing").css("transform", `rotateY(${-status.angle+180}deg) rotateX(${-status.angle}deg)`);
} else { } else {
$(".tzdDrawing").css("transform", "rotateY(0deg)"); $(".tzdDrawing").css("transform", `rotate(${-status.angle}deg)`);
} }
}); });
}); });
...@@ -1110,15 +1110,17 @@ export default { ...@@ -1110,15 +1110,17 @@ export default {
console.log("flipY: ", status.flipY); console.log("flipY: ", status.flipY);
console.log("angle: ", status.angle); console.log("angle: ", status.angle);
if (status.flipY) { if (status.flipY) {
$(".tzdDrawing").css("transform", "rotateX(180deg)"); $(".tzdDrawing").css("transform", `rotateX(${-status.angle+180}deg) rotateY(${-status.angle}deg)`);
} else { } else {
$(".tzdDrawing").css("transform", "rotateX(0deg)"); $(".tzdDrawing").css("transform", `rotate(${-status.angle}deg)`);
} }
}); });
}); });
// 重置 // 重置
$btnResetFlip.on("click", function () { $btnResetFlip.on("click", function () {
self.move_left = 0
self.move_TOP = 0
self.isX = false; self.isX = false;
self.isY = false; self.isY = false;
self.isReset = true; self.isReset = true;
...@@ -1162,10 +1164,10 @@ export default { ...@@ -1162,10 +1164,10 @@ export default {
// 向左旋转30° // 向左旋转30°
$btnRotateClockwise.on("click", function () { $btnRotateClockwise.on("click", function () {
self.isHandTZD = false self.isHandTZD = false
self.startPlace += 30; self.startPlace -= 30;
self.isLeftRotate = true; self.isLeftRotate = true;
self.isRightRotate = false; self.isRightRotate = false;
imageEditor.rotate(30); imageEditor.rotate(-30);
self.historys.push("旋转"); self.historys.push("旋转");
let canvasImage = imageEditor._graphics.getCanvasImage(); let canvasImage = imageEditor._graphics.getCanvasImage();
console.log(canvasImage); console.log(canvasImage);
...@@ -1195,10 +1197,10 @@ export default { ...@@ -1195,10 +1197,10 @@ export default {
// 向右旋转30° // 向右旋转30°
$btnRotateCounterClockWise.on("click", function () { $btnRotateCounterClockWise.on("click", function () {
self.isHandTZD = false self.isHandTZD = false
self.startPlace -= 30; self.startPlace += 30;
self.isLeftRotate = false; self.isLeftRotate = false;
self.isRightRotate = true; self.isRightRotate = true;
imageEditor.rotate(-30).then((res) => { imageEditor.rotate(+30).then((res) => {
console.log(res); console.log(res);
}); });
self.historys.push("旋转"); self.historys.push("旋转");
...@@ -1407,7 +1409,7 @@ export default { ...@@ -1407,7 +1409,7 @@ export default {
contrast: this.value / 255, contrast: this.value / 255,
}); });
}) })
/*
this.$bus.on('ajzwbjImage', (sourceImage) => { this.$bus.on('ajzwbjImage', (sourceImage) => {
// 缩放为1 // 缩放为1
self.zoomLevel = 1 self.zoomLevel = 1
...@@ -1458,32 +1460,40 @@ export default { ...@@ -1458,32 +1460,40 @@ export default {
} }
}) })
}) })
*/
this.$bus.on("ajzwbjImage", (sourceImage) => { this.$bus.on("ajzwbjImage", (sourceImage) => {
self.sourceImage = sourceImage; // 缩放为1
self.zoomLevel = 1
imageEditor.resetZoom()
self.sourceImage = sourceImage
imageEditor imageEditor
.loadImageFromURL( .loadImageFromURL(
"data:image/jpeg;base64," + sourceImage, "data:image/jpeg;base64," + sourceImage,
"SampleImage" "SampleImage"
) )
.then(function (sizeValue) { .then(function (sizeValue) {
// 更新newHeight和newWidth
self.newHeight = sizeValue.newHeight
self.newWidth = sizeValue.newWidth
// 清除自由绘制和圆形绘制 // 清除自由绘制和圆形绘制
$(".td_circle").remove(); $('.td_circle').remove()
self.circleArr_hand = []; $('.auto_td_circle').remove()
Fcanvas.clear();
self.Fcanvas = []; self.circleArr_hand = []
self.autoCircleArr_hand = []
Fcanvas.clear()
self.Fcanvas = []
self.autoFcanvas = []
// console.log(sizeValue); // console.log(sizeValue);
// 切换指纹图片时,清空特征点数组 // 切换指纹图片时,清空特征点数组
self.tzdnumber = 0; self.tzdnumber = 0
self.tzdArr = []; self.tzdArr = []
self.autoTzdArr = []; self.autoTzdArr = []
// 移除图片上的点 // 移除图片上的点
$(".tzdDom").remove(); $('.tzdDom').remove()
$(".auto_tzdDom").remove(); $('.auto_tzdDom').remove()
imageEditor.clearUndoStack(); imageEditor.clearUndoStack();
// 缩放为1
self.zoomLevel = 1;
// 获取自动提取特征 // 获取自动提取特征
self.getAutoTzd(false); self.getAutoTzd(false);
...@@ -2093,7 +2103,8 @@ export default { ...@@ -2093,7 +2103,8 @@ export default {
// Fcanvas.setHeight(self.newHeight*Fcanvas.getZoom()) // Fcanvas.setHeight(self.newHeight*Fcanvas.getZoom())
// document.querySelector('.tzdDrawing').style.transformOrigin = `${originPointer.x}px ${originPointer.y}px`; // document.querySelector('.tzdDrawing').style.transformOrigin = `${originPointer.x}px ${originPointer.y}px`;
$(".tzdDrawing").css("transform", `scale(${self.zoomLevel})`); let canvasImage = imageEditor._graphics.getCanvasImage();
$(".tzdDrawing").css("transform", `rotate(${canvasImage.angle}deg) scale(${self.zoomLevel})`);
$(".tzdDrawing_2").css("transform", `scale(${self.zoomLevel})`); $(".tzdDrawing_2").css("transform", `scale(${self.zoomLevel})`);
// document.querySelector('.tzdDrawing').style.transformOrigin = "260px 260px"; // document.querySelector('.tzdDrawing').style.transformOrigin = "260px 260px";
// console.log(`${originPointer.y}px,${originPointer.x}px`); // console.log(`${originPointer.y}px,${originPointer.x}px`);
...@@ -2129,7 +2140,8 @@ export default { ...@@ -2129,7 +2140,8 @@ export default {
// $('.tzdDom').css('z-index', `9999`) // $('.tzdDom').css('z-index', `9999`)
// $('.tzdDrawing').css('transform-origin', `${originPointer.y}px,${originPointer.x}px`) // $('.tzdDrawing').css('transform-origin', `${originPointer.y}px,${originPointer.x}px`)
// document.querySelector('.tzdDrawing').style.transformOrigin = `${originPointer.x}px ${originPointer.y}px`; // document.querySelector('.tzdDrawing').style.transformOrigin = `${originPointer.x}px ${originPointer.y}px`;
$(".tzdDrawing").css("transform", `scale(${self.zoomLevel})`); let canvasImage = imageEditor._graphics.getCanvasImage();
$(".tzdDrawing").css("transform", `rotate(${canvasImage.angle}deg) scale(${self.zoomLevel})`);
$(".tzdDrawing_2").css("transform", `scale(${self.zoomLevel})`); $(".tzdDrawing_2").css("transform", `scale(${self.zoomLevel})`);
// document.querySelector('.tzdDrawing').style.transformOrigin = "260px 260px"; // document.querySelector('.tzdDrawing').style.transformOrigin = "260px 260px";
...@@ -2184,7 +2196,7 @@ export default { ...@@ -2184,7 +2196,7 @@ export default {
deg = 0 deg = 0
} }
console.log(self.startPlace,'原点 '); console.log(self.startPlace, '原点 ');
if (deg) { if (deg) {
$("#tzd" + self.tzdId).css("transform", `rotate(${deg - self.startPlace}deg)`); $("#tzd" + self.tzdId).css("transform", `rotate(${deg - self.startPlace}deg)`);
} else { } else {
...@@ -3157,6 +3169,13 @@ export default { ...@@ -3157,6 +3169,13 @@ export default {
let self = this; let self = this;
console.log(this.rule_num); console.log(this.rule_num);
console.log(this.line_distance); console.log(this.line_distance);
if (this.kdvalue == '毫米/mm') {
this.rule_num = this.rule_num
} else if (this.kdvalue == '厘米/cm') {
this.rule_num = Number(this.rule_num) * 10
} else if (this.kdvalue == '英寸/in') {
this.rule_num = Number(this.rule_num) * 25.4
}
let frame = (this.line_distance / this.rule_num) * 26; let frame = (this.line_distance / this.rule_num) * 26;
this.bb = ((3 / 5) * this.canvasHeight) / frame; this.bb = ((3 / 5) * this.canvasHeight) / frame;
// let bb = 3/4*Math.pow(self.canvasHeight, 2)/frame // let bb = 3/4*Math.pow(self.canvasHeight, 2)/frame
...@@ -5367,3 +5386,10 @@ export default { ...@@ -5367,3 +5386,10 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./imageEdAJ.scss"; @import "./imageEdAJ.scss";
</style> </style>
<style lang="scss">
// 修改下拉框样式
.el-select-dropdown__item {
padding-left: 20px;
}
</style>
...@@ -156,6 +156,10 @@ ...@@ -156,6 +156,10 @@
} }
} }
} }
.isHasData {
background: #ECEDF1;
color: #AEAFB4;
}
} }
} }
} }
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 09:42:07 * @Date: 2021-10-22 09:42:07
* @LastEditTime: 2021-11-15 10:37:25 * @LastEditTime: 2021-11-15 14:41:58
* @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\ryzwbjLeft.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\ryzwbjLeft.vue
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="zzw-select" @click="zzwChange($event)"> <div class="zzw-select" @click="zzwChange($event)">
<div class="select-item" :class="{active: zwSelect==='滚动指纹'}">滚动指纹</div> <div class="select-item" :class="{active: zwSelect==='滚动指纹'}">滚动指纹</div>
<div class="select-line"></div> <div class="select-line"></div>
<div class="select-item" :class="{active: zwSelect==='平面指纹'}">平面指纹</div> <div class="select-item" :class="{active: zwSelect==='平面指纹', isHasData: !PainFingerFlag}">平面指纹</div>
<div class="select-line"></div> <div class="select-line"></div>
<div class="select-item" :class="{active: zwSelect==='掌纹'}">掌纹</div> <div class="select-item" :class="{active: zwSelect==='掌纹'}">掌纹</div>
</div> </div>
...@@ -88,7 +88,12 @@ ...@@ -88,7 +88,12 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
// 取消上一次请求
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
export default { export default {
data () { data () {
return { return {
...@@ -212,7 +217,10 @@ export default { ...@@ -212,7 +217,10 @@ export default {
name: '小', name: '小',
image: null image: null
} }
] ],
// 加载动画
loading: null,
timer: null,
} }
}, },
computed: { computed: {
...@@ -228,8 +236,8 @@ export default { ...@@ -228,8 +236,8 @@ export default {
// console.log(this.$route); // console.log(this.$route);
this.id = this.$route.params.id this.id = this.$route.params.id
await this.getPainFingers()
await this.getRollFingers() await this.getRollFingers()
await this.getPainFingers()
await this.findFinger() await this.findFinger()
if (self.finger && self.finger.code) { if (self.finger && self.finger.code) {
this.activerollFinger = self.finger.code this.activerollFinger = self.finger.code
...@@ -255,6 +263,7 @@ export default { ...@@ -255,6 +263,7 @@ export default {
* @return {*} * @return {*}
*/ */
getRollFingerOrigin (seq) { getRollFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$store.commit('zwbj/setSeq', seq) this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/roll/{id}/{seq} // ip:port/api/org/roll/{id}/{seq}
let self = this let self = this
...@@ -266,7 +275,8 @@ export default { ...@@ -266,7 +275,8 @@ export default {
barcode: self.barcode, barcode: self.barcode,
seqno: self.seq seqno: self.seq
}, },
loading: false loading: false,
cancelToken: source.token,
// url: `/api/org/roll/${1}/${seq}?mnt=1` // url: `/api/org/roll/${1}/${seq}?mnt=1`
}).then(res => { }).then(res => {
console.log(res); console.log(res);
...@@ -278,6 +288,11 @@ export default { ...@@ -278,6 +288,11 @@ export default {
} }
} }
}) })
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
/** /**
* @description: 获取平面指纹原图 * @description: 获取平面指纹原图
...@@ -285,6 +300,7 @@ export default { ...@@ -285,6 +300,7 @@ export default {
* @return {*} * @return {*}
*/ */
getPainFingerOrigin (seq) { getPainFingerOrigin (seq) {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$store.commit('zwbj/setSeq', seq) this.$store.commit('zwbj/setSeq', seq)
// ip:port/api/org/plain/{id}/{seq} // ip:port/api/org/plain/{id}/{seq}
let self = this let self = this
...@@ -296,7 +312,8 @@ export default { ...@@ -296,7 +312,8 @@ export default {
barcode: self.barcode, barcode: self.barcode,
seqno: self.seq seqno: self.seq
}, },
loading: false loading: false,
cancelToken: source.token,
// url: `/api/org/plain/${1}/${seq}?mnt=1` // url: `/api/org/plain/${1}/${seq}?mnt=1`
}).then(res => { }).then(res => {
// console.log(res); // console.log(res);
...@@ -308,6 +325,11 @@ export default { ...@@ -308,6 +325,11 @@ export default {
} }
} }
}) })
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
/** /**
* @description: 获取滚动指纹 * @description: 获取滚动指纹
...@@ -315,6 +337,7 @@ export default { ...@@ -315,6 +337,7 @@ export default {
* @return {*} * @return {*}
*/ */
async getRollFingers () { async getRollFingers () {
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this let self = this
// 请求之前先清空图片数据 // 请求之前先清空图片数据
self.rollFingersLeft.forEach((item) => { self.rollFingersLeft.forEach((item) => {
...@@ -388,9 +411,7 @@ export default { ...@@ -388,9 +411,7 @@ export default {
// 左手 // 左手
if (element.seq > 15) { if (element.seq > 15) {
self.painFingersLeft.forEach((item) => { self.painFingersLeft.forEach((item) => {
if (item.code == element.seq) { if (item.code == element.seq) {
item.image = element.image item.image = element.image
} }
}) })
...@@ -405,11 +426,20 @@ export default { ...@@ -405,11 +426,20 @@ export default {
} }
self.PainFingerFlag = true self.PainFingerFlag = true
} else { } else {
debugger
// 没有平面指纹,不能切换tabl栏 // 没有平面指纹,不能切换tabl栏
self.PainFingerFlag = false self.PainFingerFlag = false
} }
} else {
// 没有数据
this.$message.error('未查找到相关记录')
// 没有平面指纹,不能切换tabl栏
self.PainFingerFlag = false
} }
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
/** /**
* @description: 切换单个指纹 * @description: 切换单个指纹
...@@ -448,34 +478,36 @@ export default { ...@@ -448,34 +478,36 @@ export default {
async findFinger () { async findFinger () {
let self = this let self = this
self.finger = null self.finger = null
self.rollFingersLeft.some((item, index) => {
self.rollFingersRight.some((item, index) => {
if (item.image !== null) { if (item.image !== null) {
self.finger = item self.finger = item
return true return true
} }
}) })
if (self.finger) return self.finger if (self.finger) return self.finger
self.rollFingersRight.some((item, index) => { self.rollFingersLeft.some((item, index) => {
if (item.image !== null) { if (item.image !== null) {
self.finger = item self.finger = item
return true return true
} }
}) })
if (self.finger) return self.finger if (self.finger) return self.finger
self.painFingersLeft.some((item, index) => { self.painFingersRight.some((item, index) => {
if (item.image !== null) { if (item.image !== null) {
self.finger = item self.finger = item
return true return true
} }
}) })
if (self.finger) return self.finger if (self.finger) return self.finger
self.painFingersRight.some((item, index) => { self.painFingersLeft.some((item, index) => {
if (item.image !== null) { if (item.image !== null) {
self.finger = item self.finger = item
return true return true
} }
}) })
if (self.finger) return self.finger if (self.finger) return self.finger
return self.finger return self.finger
}, },
/** /**
......
<template> <template>
<div id="home"> <div id="home-div">
<el-container class="layout-container"> <div id="home" :class="{zhanshi: isCropper}">
<transition name="slide"> <el-container class="layout-container">
<el-aside :width="isCollapse ? '4rem' : '17.5rem'" class="aside"> <transition name="slide">
<div <el-aside :width="isCollapse ? '4rem' : '17.5rem'" class="aside">
class="logo" <div class="logo" :class="{ minLogo: isCollapse }" @click="$router.push('/Home/Home')">
:class="{ minLogo: isCollapse }" <img class="jh" src="../assets/img/Home/jh.png" alt="" />
@click="$router.push('/Home/Home')" <img v-show="!isCollapse" class="title" src="../assets/img/Home/title.png" alt="" />
> </div>
<img class="jh" src="../assets/img/Home/jh.png" alt="" /> <!-- <div class="search">
<img
v-show="!isCollapse"
class="title"
src="../assets/img/Home/title.png"
alt=""
/>
</div>
<!-- <div class="search">
<el-input v-if="!isCollapse" @keyup.enter.native="goSearch()" class="searchTxt" prefix-icon="el-icon-search" v-model="searchTxt" placeholder="搜索"></el-input> <el-input v-if="!isCollapse" @keyup.enter.native="goSearch()" class="searchTxt" prefix-icon="el-icon-search" v-model="searchTxt" placeholder="搜索"></el-input>
<i class="search-icon el-icon-search" v-else></i> <i class="search-icon el-icon-search" v-else></i>
</div> --> </div> -->
<el-menu <el-menu :collapse-transition="false" ref="menu" :default-active="menuActive" text-color="#CCCCCC" active-text-color="#ffffff" background-color="#1F2D45" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse" @select="selectPath">
:collapse-transition="false" <div v-for="(menu, i) in routes" :key="i">
ref="menu" <el-submenu :index="menu.name" v-if="menu.children && !menu.hidden">
:default-active="menuActive" <template slot="title">
text-color="#CCCCCC" <img v-if="$route.path != menu.path" :src="menu.icon_d" alt="" />
active-text-color="#ffffff" <img v-else :src="menu.icon_a" alt="" />
background-color="#1F2D45" <span v-show="!isCollapse">{{ menu.meta.title }}</span>
class="el-menu-vertical-demo" </template>
@open="handleOpen" <div v-for="(item, index) in menu.children" :key="index">
@close="handleClose" <el-menu-item v-if="!item.hidden" :index="item.name">{{
:collapse="isCollapse"
@select="selectPath"
>
<div v-for="(menu, i) in routes" :key="i">
<el-submenu
:index="menu.name"
v-if="menu.children && !menu.hidden"
>
<template slot="title">
<img
v-if="$route.path != menu.path"
:src="menu.icon_d"
alt=""
/>
<img v-else :src="menu.icon_a" alt="" />
<span v-show="!isCollapse">{{ menu.meta.title }}</span>
</template>
<div v-for="(item, index) in menu.children" :key="index">
<el-menu-item v-if="!item.hidden" :index="item.name">{{
item.meta.title item.meta.title
}}</el-menu-item> }}</el-menu-item>
</div> </div>
</el-submenu> </el-submenu>
<el-menu-item <el-menu-item :index="menu.name" v-else-if="!menu.children && !menu.hidden">
:index="menu.name" <img v-if="$route.path != menu.path" :src="menu.icon_d" alt="" />
v-else-if="!menu.children && !menu.hidden" <img v-else :src="menu.icon_a" alt="" />
> <span slot="title">{{ menu.meta.title }}</span>
<img </el-menu-item>
v-if="$route.path != menu.path" </div>
:src="menu.icon_d" </el-menu>
alt="" <div class="fz">
/> <img v-if="!isCollapse" src="../assets/img/Home/logo.png" alt="" />
<img v-else :src="menu.icon_a" alt="" /> <img v-else src="../assets/img/Home/fang.png" alt="" />
<span slot="title">{{ menu.meta.title }}</span> </div>
</el-menu-item> </el-aside>
</transition>
<el-container class="container-dom">
<el-header class="header">
<div class="collapse" @click="switchCollapse">
<img v-if="isCollapse" :src="rightImg" alt="" />
<img v-else :src="leftImg" alt="" />
</div> </div>
</el-menu> <div class="options">
<div class="fz"> <!-- <div class="sendFind">发查询</div> -->
<img v-if="!isCollapse" src="../assets/img/Home/logo.png" alt="" /> <div class="set">系统管理</div>
<img v-else src="../assets/img/Home/fang.png" alt="" /> <div class="role">指纹员</div>
</div> <div class="message">
</el-aside> <div class="circle"></div>
</transition> </div>
<el-container> <div class="quit" @click="$router.push('/Home/Home')"></div>
<el-header class="header"> <div class="logout" @click="logout">
<div class="collapse" @click="switchCollapse"> <svg-icon v-show="!isHoverLogout" icon-class="logout_d" class="icon" @mouseover="isHoverLogout = true" @mouseleave="isHoverLogout = false" />
<img v-if="isCollapse" :src="rightImg" alt="" /> <svg-icon v-show="isHoverLogout" icon-class="logout_a" class="icon" />
<img v-else :src="leftImg" alt="" /> </div>
</div>
<div class="options">
<!-- <div class="sendFind">发查询</div> -->
<div class="set">系统管理</div>
<div class="role">指纹员</div>
<div class="message">
<div class="circle"></div>
</div> </div>
<div class="quit" @click="$router.push('/Home/Home')"></div> </el-header>
<div class="logout" @click="logout"> <el-main class="main">
<svg-icon <div class="contain">
v-show="!isHoverLogout" <el-tabs :closable="paths.length > 1" v-model="routePath" @tab-click="handleClick" @tab-remove="tabRemove">
icon-class="logout_d" <el-tab-pane :label="item.name" :name="item.routeName" v-for="item in paths" :key="item.routeName"></el-tab-pane>
class="icon" </el-tabs>
@mouseover="isHoverLogout = true" <div class="breadcrumb"></div>
@mouseleave="isHoverLogout = false" <!-- 路由出口 -->
/> <keep-alive :include="cachePageName">
<svg-icon <router-view></router-view>
v-show="isHoverLogout" </keep-alive>
icon-class="logout_a"
class="icon"
/>
</div> </div>
</div> </el-main>
</el-header> </el-container>
<el-main class="main">
<div class="contain">
<el-tabs
:closable="paths.length > 1"
v-model="routePath"
@tab-click="handleClick"
@tab-remove="tabRemove"
>
<el-tab-pane
:label="item.name"
:name="item.routeName"
v-for="item in paths"
:key="item.routeName"
></el-tab-pane>
</el-tabs>
<div class="breadcrumb"></div>
<!-- 路由出口 -->
<keep-alive :include="cachePageName">
<router-view></router-view>
</keep-alive>
</div>
</el-main>
</el-container> </el-container>
</el-container>
<!-- <button @click="toLogin1">登录页</button> <!-- <button @click="toLogin1">登录页</button>
<button @click="toHome1">门户页面</button> <button @click="toHome1">门户页面</button>
<button @click="toEditor">指纹处理</button> <button @click="toEditor">指纹处理</button>
<button @click="toConfirm">查询认定</button> <button @click="toConfirm">查询认定</button>
<button @click="toAllPersonnelBase">全部人员库</button> --> <button @click="toAllPersonnelBase">全部人员库</button> -->
</div>
<!-- 毛玻璃 -->
<div class="cropper" v-show="isCropper">
<img class="cropperImage" :src="cropperImage" alt="">
<div class="shadow"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
import zoom from "@/utils/autosize"; import html2canvas from 'html2canvas';
import "@/icons/logout_d.svg"; import "@/icons/logout_d.svg";
import "@/icons/logout_a.svg"; import "@/icons/logout_a.svg";
import indexRoutes from "@/router/modules/index"; import indexRoutes from "@/router/modules/index";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
name: "Home", name: "Home",
data() { data () {
return { return {
searchTxt: "", searchTxt: "",
routes: this.$store.getters["layout/leftMenuData"], routes: this.$store.getters["layout/leftMenuData"],
...@@ -155,22 +108,32 @@ export default { ...@@ -155,22 +108,32 @@ export default {
menuActive: "", menuActive: "",
isHoverLogout: false, isHoverLogout: false,
routePath: "", routePath: "",
// 截屏出来的img url
cropperImage: '',
// 是否展示毛玻璃
isCropper: false
}; };
}, },
mounted() { mounted () {
let self = this
this.menuActive = this.$route.name; this.menuActive = this.$route.name;
// console.log(this.$route);
// zoom('home') // 是否模糊
// window.addEventListener('resize', function () { this.$bus.on('isBlur', (isBlur) => {
// zoom('home') if(isBlur) {
// }) self.isCropper = true
self.screenshot()
} else {
self.isCropper = false
}
})
}, },
updated() { updated () {
this.menuActive = this.$route.name; this.menuActive = this.$route.name;
}, },
computed: { computed: {
...mapGetters(["defaultGoodsImage", "userAuth"]), ...mapGetters(["defaultGoodsImage", "userAuth"]),
cachePageName() { cachePageName () {
return this.$store.state.layout.cachePageName; return this.$store.state.layout.cachePageName;
}, },
}, },
...@@ -181,7 +144,7 @@ export default { ...@@ -181,7 +144,7 @@ export default {
* @return {*} * @return {*}
*/ */
logout() { logout () {
// console.log('退出登录'); // console.log('退出登录');
// this.$router.replace('/login1') // this.$router.replace('/login1')
this.$axios this.$axios
...@@ -205,11 +168,11 @@ export default { ...@@ -205,11 +168,11 @@ export default {
* @return {*} * @return {*}
*/ */
goSearch() { goSearch () {
this.searchTxt = ""; this.searchTxt = "";
console.log(this.searchTxt); console.log(this.searchTxt);
}, },
handleClick({ name }) { handleClick ({ name }) {
if (name == "/Home/htzwcj") { if (name == "/Home/htzwcj") {
this.$router.push(name); this.$router.push(name);
this.menuActive = ""; this.menuActive = "";
...@@ -219,7 +182,7 @@ export default { ...@@ -219,7 +182,7 @@ export default {
this.menuActive = routerObj.routeName; this.menuActive = routerObj.routeName;
} }
}, },
tabRemove(name) { tabRemove (name) {
let routerObj = this.paths.find((i) => i.routeName == name); let routerObj = this.paths.find((i) => i.routeName == name);
if (routerObj) { if (routerObj) {
let pathName = routerObj.name; let pathName = routerObj.name;
...@@ -244,7 +207,7 @@ export default { ...@@ -244,7 +207,7 @@ export default {
sessionStorage.setItem("crumbs", JSON.stringify(this.paths)); sessionStorage.setItem("crumbs", JSON.stringify(this.paths));
this.setKeepAlive(); this.setKeepAlive();
}, },
setKeepAlive() { setKeepAlive () {
let cachePageName; let cachePageName;
if (JSON.parse(sessionStorage.getItem("crumbs")).length > 0) { if (JSON.parse(sessionStorage.getItem("crumbs")).length > 0) {
cachePageName = JSON.parse(sessionStorage.getItem("crumbs")) cachePageName = JSON.parse(sessionStorage.getItem("crumbs"))
...@@ -263,7 +226,7 @@ export default { ...@@ -263,7 +226,7 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
goManager() { goManager () {
this.$router.push("/Home/htzwcj"); this.$router.push("/Home/htzwcj");
this.menuActive = ""; this.menuActive = "";
}, },
...@@ -273,7 +236,7 @@ export default { ...@@ -273,7 +236,7 @@ export default {
* @param {*} path * @param {*} path
* @return {*} * @return {*}
*/ */
selectPath(index, path) { selectPath (index, path) {
this.$router.push({ name: index }); this.$router.push({ name: index });
}, },
/** /**
...@@ -281,7 +244,7 @@ export default { ...@@ -281,7 +244,7 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
closePaths(pathName) { closePaths (pathName) {
let res = this.paths.filter((item) => { let res = this.paths.filter((item) => {
return item.name != pathName; return item.name != pathName;
}); });
...@@ -297,7 +260,7 @@ export default { ...@@ -297,7 +260,7 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
changeRouter(route) { changeRouter (route) {
this.$router.push(route.path); this.$router.push(route.path);
this.menuActive = route.routeName; this.menuActive = route.routeName;
}, },
...@@ -306,15 +269,38 @@ export default { ...@@ -306,15 +269,38 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
switchCollapse() { switchCollapse () {
this.isCollapse = !this.isCollapse; this.isCollapse = !this.isCollapse;
}, },
handleOpen(key, keyPath) { handleOpen (key, keyPath) {
console.log(key, keyPath); console.log(key, keyPath);
}, },
handleClose(key, keyPath) { handleClose (key, keyPath) {
console.log(key, keyPath); console.log(key, keyPath);
}, },
/**
* @description: 模糊操作
* @param {*}
* @return {*}
*/
screenshot () {
let self = this
this.isCropper = true
html2canvas(
document.querySelector('#home'),
{
backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
useCORS: true,//支持图片跨域
scale: 1,//设置放大的倍数
}
).then(canvas => {
// 截图用img元素承装,显示在页面的上
let img = new Image();
img.src = canvas.toDataURL('image/jpeg');// toDataURL :图片格式转成 base64
// document.getElementById('test').appendChild(img);
self.cropperImage = canvas.toDataURL('image/jpeg')
})
},
}, },
watch: { watch: {
$route: { $route: {
...@@ -351,7 +337,7 @@ export default { ...@@ -351,7 +337,7 @@ export default {
immediate: true, immediate: true,
}, },
}, },
created() { created () {
this.paths = sessionStorage.getItem("crumbs") this.paths = sessionStorage.getItem("crumbs")
? JSON.parse(sessionStorage.getItem("crumbs")) ? JSON.parse(sessionStorage.getItem("crumbs"))
: []; : [];
...@@ -359,17 +345,49 @@ export default { ...@@ -359,17 +345,49 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.v-modal {
background: none;
}
// 模糊的背景
.cropper {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
img {
width: 100%;
height: 100%;
filter: blur(1.5px);
}
}
.shadow {
z-index: 999;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba($color: #fff, $alpha: 0.65);
}
#home { #home {
height: 100vh; height: 100vh;
//height: 100%; //height: 100%;
// filter: blur(5px); // filter: blur(5px);
} }
.zhanshi {
display: none;
}
.layout-container { .layout-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
} }
.container-dom {
background: #f5f5f5;
height: 100%;
}
/deep/.el-menu.el-menu--inline { /deep/.el-menu.el-menu--inline {
.el-menu-item { .el-menu-item {
padding-left: 50px !important; padding-left: 50px !important;
......
...@@ -199,6 +199,8 @@ ...@@ -199,6 +199,8 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
export default { export default {
name: "LTCandidate", name: "LTCandidate",
data () { data () {
...@@ -246,7 +248,10 @@ export default { ...@@ -246,7 +248,10 @@ export default {
// 是否展示指纹下拉框 // 是否展示指纹下拉框
isFingerDropdown: false, isFingerDropdown: false,
// 选择的指纹类型 // 选择的指纹类型
fingershowType: '' fingershowType: '',
// 加载动画
loading: null,
timer: null,
}; };
}, },
created () { created () {
...@@ -1097,11 +1102,18 @@ export default { ...@@ -1097,11 +1102,18 @@ export default {
// } // }
let zcseq = sessionStorage.getItem('zcseq') let zcseq = sessionStorage.getItem('zcseq')
let qqid = sessionStorage.getItem('qqid') let qqid = sessionStorage.getItem('qqid')
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${qqid}/${zcseq}`, { srcbarcode: sessionStorage.getItem('srcbarcode'), destbarcode: self.input3.trim() }) this.$axios.post(`/api/query/matchcand/dest/${qqid}/${zcseq}`, { srcbarcode: sessionStorage.getItem('srcbarcode'), destbarcode: self.input3.trim() })
.then(response => { .then(response => {
console.log(response); console.log(response);
self.tableData = response.data.ret self.tableData = response.data.ret
self.total = self.tableData.length self.total = self.tableData.length
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}) })
}, },
/** /**
...@@ -1121,6 +1133,7 @@ export default { ...@@ -1121,6 +1133,7 @@ export default {
// 存储目的数据序号 // 存储目的数据序号
sessionStorage.setItem("destseqno", val.destseqno); sessionStorage.setItem("destseqno", val.destseqno);
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
// 平面 // 平面
if (val.destseqno > 10) { if (val.destseqno > 10) {
this.$axios this.$axios
...@@ -1142,6 +1155,11 @@ export default { ...@@ -1142,6 +1155,11 @@ export default {
self.$bus.emit("changImageEditTarget", response.data.ret.image); self.$bus.emit("changImageEditTarget", response.data.ret.image);
}) })
} }
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`) // this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
// this.$axios // this.$axios
...@@ -1231,7 +1249,7 @@ const candidates = [ ...@@ -1231,7 +1249,7 @@ const candidates = [
} }
} }
.input { .input {
width: 272px; width: 270px;
height: 32px; height: 32px;
background: #ffffff; background: #ffffff;
border-top-left-radius: 4px; border-top-left-radius: 4px;
...@@ -1414,7 +1432,7 @@ const candidates = [ ...@@ -1414,7 +1432,7 @@ const candidates = [
} }
.lt_candidate .lt_cnadidate_search .input { .lt_candidate .lt_cnadidate_search .input {
box-sizing: border-box; box-sizing: border-box;
width: 290px; width: 286px;
} }
/deep/.el-input { /deep/.el-input {
box-sizing: border-box !important; box-sizing: border-box !important;
......
...@@ -76,6 +76,8 @@ ...@@ -76,6 +76,8 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
export default { export default {
name: "LTSrc", name: "LTSrc",
props: ["srcData"], props: ["srcData"],
...@@ -113,7 +115,10 @@ export default { ...@@ -113,7 +115,10 @@ export default {
fingerTotal: 0, fingerTotal: 0,
currentRow: null, currentRow: null,
options: '展开', options: '展开',
qqid: null qqid: null,
// 加载动画
loading: null,
timer: null,
}; };
}, },
methods: { methods: {
...@@ -147,6 +152,8 @@ export default { ...@@ -147,6 +152,8 @@ export default {
* @return {*} * @return {*}
*/ */
handleCurrentChange (val, old) { handleCurrentChange (val, old) {
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this let self = this
if (val == null) return; if (val == null) return;
// 改变数据为点击状态 // 改变数据为点击状态
...@@ -174,6 +181,11 @@ export default { ...@@ -174,6 +181,11 @@ export default {
self.changeStyle(0, self.enumerate[0]) self.changeStyle(0, self.enumerate[0])
}) })
this.isActive = ""; this.isActive = "";
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
/** /**
* @description: 获取列表数据 * @description: 获取列表数据
...@@ -181,6 +193,8 @@ export default { ...@@ -181,6 +193,8 @@ export default {
* @return {*} * @return {*}
*/ */
getDetailData () { getDetailData () {
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
let self = this let self = this
if (this.type == 'father') { if (this.type == 'father') {
this.$axios this.$axios
...@@ -211,6 +225,10 @@ export default { ...@@ -211,6 +225,10 @@ export default {
}) })
}); });
} }
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}, },
// 获取选择的任务详情 // 获取选择的任务详情
getFirgerPrintDetail (row) { getFirgerPrintDetail (row) {
...@@ -241,11 +259,17 @@ export default { ...@@ -241,11 +259,17 @@ export default {
sessionStorage.setItem('srcseqno', imageInfo.seq) sessionStorage.setItem('srcseqno', imageInfo.seq)
sessionStorage.setItem('zcseq', imageInfo.seq) sessionStorage.setItem('zcseq', imageInfo.seq)
this.$bus.emit('changImageEdit', imageInfo.image) this.$bus.emit('changImageEdit', imageInfo.image)
// 发送请求
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }) this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.seq}`, { srcbarcode: sessionStorage.getItem('srcbarcode') })
.then(response => { .then(response => {
console.log(response); console.log(response);
self.$bus.emit('initCandidate', response.data.ret) self.$bus.emit('initCandidate', response.data.ret)
}) })
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
} }
}, },
/** /**
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
export default { export default {
name: "TLCandidate", name: "TLCandidate",
data () { data () {
...@@ -28,7 +30,10 @@ export default { ...@@ -28,7 +30,10 @@ export default {
tableData: [], tableData: [],
sourceTableData: [], sourceTableData: [],
checked: true, checked: true,
total: 0 total: 0,
// 加载动画
loading: null,
timer: null,
}; };
}, },
created () { created () {
...@@ -63,19 +68,28 @@ export default { ...@@ -63,19 +68,28 @@ export default {
* @description: 搜索 * @description: 搜索
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
search() { search () {
let self = this let self = this
let dcseq = sessionStorage.getItem('dcseq') let dcseq = sessionStorage.getItem('dcseq')
let qqid = sessionStorage.getItem('qqid') let qqid = sessionStorage.getItem('qqid')
this.$axios.post(`/api/query/matchcand/dest/${qqid}/${dcseq}`, { srcbarcode: sessionStorage.getItem('srcbarcode'), destbarcode: self.input3.trim() }) this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${qqid}/${dcseq}`, { srcbarcode: sessionStorage.getItem('srcbarcode'), destbarcode: self.input3.trim() }, { loading: false })
.then(response => { .then(response => {
console.log(response); console.log(response);
self.tableData = response.data.ret self.tableData = response.data.ret
self.total = self.tableData.total self.total = self.tableData.total
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}) })
}, },
handleCurrentChange (val, old) { handleCurrentChange (val, old) {
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
let self = this let self = this
console.info(val, old); console.info(val, old);
if (val != null) { if (val != null) {
...@@ -88,14 +102,20 @@ export default { ...@@ -88,14 +102,20 @@ export default {
// 存储倒查序号 // 存储倒查序号
sessionStorage.setItem("backcheckXh", val.destseqno) sessionStorage.setItem("backcheckXh", val.destseqno)
// this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`) // this.$axios.get(`/api/api/org/plainByBarcode/R1100002487002018050034/1/`)
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios this.$axios
.post('/api/org/caseBybarcode/barcode/seq', { .post('/api/org/caseBybarcode/barcode/seq', {
barcode:val.destbarcode, barcode: val.destbarcode,
seqno:val.destseqno, seqno: val.destseqno,
qqid: val.qqid qqid: val.qqid
}).then(response => { }, { loading: false, cancelToken: source.token }).then(response => {
console.log(response); console.log(response);
self.$bus.emit("changImageEditTarget", response.data.ret.image); self.$bus.emit("changImageEditTarget", response.data.ret.image);
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
}); });
// this.$axios // this.$axios
// .get(`/api/org/plainByBarcode/${val.destbarcode}/${val.destid}`) // .get(`/api/org/plainByBarcode/${val.destbarcode}/${val.destid}`)
......
...@@ -254,6 +254,8 @@ ...@@ -254,6 +254,8 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { Loading } from 'element-ui';
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import "@/icons/loading.svg"; import "@/icons/loading.svg";
...@@ -327,7 +329,10 @@ export default { ...@@ -327,7 +329,10 @@ export default {
// 指纹图片加载 // 指纹图片加载
fingerLoading: true, fingerLoading: true,
// 平面的tab栏是否可以点击 // 平面的tab栏是否可以点击
painFlag: true painFlag: true,
// 加载动画
loading: null,
timer: null,
}; };
}, },
mounted () { mounted () {
...@@ -376,7 +381,7 @@ export default { ...@@ -376,7 +381,7 @@ export default {
* @return {*} * @return {*}
*/ */
switchPain () { switchPain () {
if(!this.painFlag) return; if (!this.painFlag) return;
this.fingerShowType = 'pain' this.fingerShowType = 'pain'
}, },
/** /**
...@@ -434,6 +439,8 @@ export default { ...@@ -434,6 +439,8 @@ export default {
barcode: barcode, barcode: barcode,
qqid: self.qqid, qqid: self.qqid,
querytype: '1' querytype: '1'
}, {
loading: false
}) })
console.log(fingerPain); console.log(fingerPain);
if (fingerPain.data.ret && fingerPain.data.ret.length > 0) { if (fingerPain.data.ret && fingerPain.data.ret.length > 0) {
...@@ -492,6 +499,8 @@ export default { ...@@ -492,6 +499,8 @@ export default {
barcode: barcode, barcode: barcode,
qqid: self.qqid, qqid: self.qqid,
querytype: '1' querytype: '1'
}, {
loading: false
}) })
console.log(fingerRoll); console.log(fingerRoll);
if (fingerRoll.data.ret && fingerRoll.data.ret.length > 0) { if (fingerRoll.data.ret && fingerRoll.data.ret.length > 0) {
...@@ -572,12 +581,15 @@ export default { ...@@ -572,12 +581,15 @@ export default {
// 获取列表数据 // 获取列表数据
async getDetailData () { async getDetailData () {
// 发送请求 // 发送请求
this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
NProgress.start(); NProgress.start();
console.info(this.dataList); console.info(this.dataList);
let self = this let self = this
if (self.type == 'father') { if (self.type == 'father') {
await this.$axios await this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }) .post("/api/queryque/standardAll", { contrastCustomSearchReq: { qid: Number(self.qid) } }, {
loading: false
})
.then(response => { .then(response => {
console.log(response); console.log(response);
self.sourceDataList = response.data.ret self.sourceDataList = response.data.ret
...@@ -591,7 +603,9 @@ export default { ...@@ -591,7 +603,9 @@ export default {
}); });
} else { } else {
await this.$axios await this.$axios
.post("/api/queryque/standardAll", { contrastCustomSearchReq: { qqid: Number(self.qqid) } }) .post("/api/queryque/standardAll", { contrastCustomSearchReq: { qqid: Number(self.qqid) } }, {
loading: false
})
.then(response => { .then(response => {
console.log(response); console.log(response);
self.sourceDataList = response.data.ret self.sourceDataList = response.data.ret
...@@ -604,7 +618,6 @@ export default { ...@@ -604,7 +618,6 @@ export default {
}) })
}); });
} }
NProgress.done(); NProgress.done();
}, },
/** /**
...@@ -648,7 +661,7 @@ export default { ...@@ -648,7 +661,7 @@ export default {
} }
}) })
console.log(self.finger); console.log(self.finger);
return self.finger return self.finger
}, },
// 获取选择的任务详情 // 获取选择的任务详情
...@@ -681,6 +694,9 @@ export default { ...@@ -681,6 +694,9 @@ export default {
* @return {*} * @return {*}
*/ */
changeStyleLeftR (index, imageInfo) { changeStyleLeftR (index, imageInfo) {
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
console.log(imageInfo); console.log(imageInfo);
let self = this let self = this
// 如果图片存在 // 如果图片存在
...@@ -697,12 +713,40 @@ export default { ...@@ -697,12 +713,40 @@ export default {
this.$bus.emit('changImageEdit', imageInfo.image) this.$bus.emit('changImageEdit', imageInfo.image)
} }
NProgress.start(); NProgress.start();
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }) this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios({
method: 'post',
url: `/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`,
data: {
srcbarcode: sessionStorage.getItem('srcbarcode')
},
cancelToken: source.token,
loading: false,
})
// this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }, {
// loading: false,
// cancelToken: new this.$axios.CancelToken(function executor (c) {
// self.source = c;
// })
// })
.then(response => { .then(response => {
console.log(response); console.log(response);
self.$bus.emit('initTLCandidate', response.data.ret) self.$bus.emit('initTLCandidate', response.data.ret)
}).catch(error => {
if (this.$axios.isCancel(err)) {
console.log('Rquest canceled', err.message); //请求如果被取消,这里是返回取消的message
} else {
//handle error
console.log(err);
}
}) })
NProgress.done(); NProgress.done();
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
} }
}, },
/** /**
...@@ -712,6 +756,8 @@ export default { ...@@ -712,6 +756,8 @@ export default {
* @return {*} * @return {*}
*/ */
changeStyleRightR (index, imageInfo) { changeStyleRightR (index, imageInfo) {
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
console.log(imageInfo); console.log(imageInfo);
let self = this let self = this
if (imageInfo.image) { if (imageInfo.image) {
...@@ -726,12 +772,28 @@ export default { ...@@ -726,12 +772,28 @@ export default {
this.$bus.emit('changImageEdit', imageInfo.image) this.$bus.emit('changImageEdit', imageInfo.image)
} }
NProgress.start(); NProgress.start();
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }) this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }, {
loading: false,
cancelToken: source.token,
})
.then(response => { .then(response => {
console.log(response); console.log(response);
self.$bus.emit('initTLCandidate', response.data.ret) self.$bus.emit('initTLCandidate', response.data.ret)
}).catch(err => {
if (this.$axios.isCancel(err)) {
console.log('Rquest canceled', err.message); //请求如果被取消,这里是返回取消的message
} else {
//handle error
console.log(err);
}
}) })
NProgress.done(); NProgress.done();
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
} }
}, },
/** /**
...@@ -741,6 +803,8 @@ export default { ...@@ -741,6 +803,8 @@ export default {
* @return {*} * @return {*}
*/ */
changeStyleLeftL (index, imageInfo) { changeStyleLeftL (index, imageInfo) {
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
console.log(imageInfo); console.log(imageInfo);
let self = this let self = this
if (imageInfo.image) { if (imageInfo.image) {
...@@ -755,12 +819,28 @@ export default { ...@@ -755,12 +819,28 @@ export default {
this.$bus.emit('changImageEdit', imageInfo.image) this.$bus.emit('changImageEdit', imageInfo.image)
} }
NProgress.start(); NProgress.start();
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }) this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { srcbarcode: sessionStorage.getItem('srcbarcode') }, {
loading: false,
cancelToken: source.token,
})
.then(response => { .then(response => {
console.log(response); console.log(response);
self.$bus.emit('initTLCandidate', response.data.ret) self.$bus.emit('initTLCandidate', response.data.ret)
}).catch(err => {
if (this.$axios.isCancel(err)) {
console.log('Rquest canceled', err.message); //请求如果被取消,这里是返回取消的message
} else {
//handle error
console.log(err);
}
}) })
NProgress.done(); NProgress.done();
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
} }
}, },
/** /**
...@@ -770,6 +850,8 @@ export default { ...@@ -770,6 +850,8 @@ export default {
* @return {*} * @return {*}
*/ */
changeStyleRightL (index, imageInfo) { changeStyleRightL (index, imageInfo) {
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
console.log(imageInfo); console.log(imageInfo);
let self = this let self = this
if (imageInfo.image) { if (imageInfo.image) {
...@@ -784,14 +866,38 @@ export default { ...@@ -784,14 +866,38 @@ export default {
this.$bus.emit('changImageEdit', imageInfo.image) this.$bus.emit('changImageEdit', imageInfo.image)
} }
NProgress.start(); NProgress.start();
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { "srcbarcode": sessionStorage.getItem('srcbarcode') }) this.loading = Loading.service({ fullscreen: true, text: '正在加载...' });
this.$axios.post(`/api/query/matchcand/dest/${self.qqid}/${imageInfo.code}`, { "srcbarcode": sessionStorage.getItem('srcbarcode') }, {
loading: false,
cancelToken: source.token,
})
.then(response => { .then(response => {
console.log(response); console.log(response);
self.$bus.emit('initTLCandidate', response.data.ret) self.$bus.emit('initTLCandidate', response.data.ret)
}).catch(err => {
if (this.$axios.isCancel(err)) {
console.log('Rquest canceled', err.message); //请求如果被取消,这里是返回取消的message
} else {
//handle error
console.log(err);
}
}) })
NProgress.done(); NProgress.done();
clearTimeout(self.timer)
self.timer = setTimeout(() => {
self.loading && self.loading.close();
self.loading = null
}, 1200);
} }
} },
/**
* 取消删一次请求
*/
cancelQuest () {
if (typeof this.source === 'function') {
this.source('终止请求'); //取消请求
}
},
}, },
watch: { watch: {
/** /**
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-09-07 09:57:48 * @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-15 13:38:00 * @LastEditTime: 2021-11-15 21:11:13
* @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
...@@ -92,12 +92,13 @@ module.exports = { ...@@ -92,12 +92,13 @@ module.exports = {
// target: "http://192.168.0.137:8080/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ // target: "http://192.168.0.137:8080/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/
// target: "http://172.18.108.2:8099/", // 张 认定 // target: "http://172.18.108.2:8099/", // 张 认定
// target: "http://192.168.128.110:8099", // 湖南-张 // target: "http://192.168.128.110: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.116:8099", // 湖南-王
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma // target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
// 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/", // 湖南-线上
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