Commit 7956e48d by 张超军

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

parents e69a051d 20a771f8
......@@ -78,3 +78,73 @@ export default {};
}
}
</style>
<style lang="scss">
.el-message-box__message {
margin: 23px 24px 17px 24px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #333333;
}
.el-message-box__btns {
margin-bottom: 24px;
padding-bottom: 24px;
// 交换 确定 取消 按钮的位置
.el-button:nth-child(1) {
float: right;
margin-right: 23%;
width: 72px;
height: 40px;
background: #055fe7;
border-radius: 4px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #ffffff;
}
.el-button:nth-child(2) {
float: left;
margin-left: 23%;
width: 72px;
height: 40px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #aeb5c2;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #2e3846;
}
}
.el-popconfirm__main {
margin: 23px 24px 17px 24px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #333333;
}
.el-popconfirm__action {
margin-bottom: 24px;
padding-bottom: 24px;
// 交换 确定 取消 按钮的位置
.el-button:nth-child(1) {
float: right;
margin-right: 23%;
width: 72px;
height: 32px;
background: #055fe7;
border-radius: 4px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #ffffff;
}
.el-button:nth-child(2) {
float: left;
margin-left: 23%;
width: 72px;
height: 32px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #aeb5c2;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #2e3846;
}
}
</style>
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-26 11:31:17
* @LastEditTime: 2021-11-26 16:55:10
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\plugins\axios.js
......@@ -15,9 +15,8 @@ import "nprogress/nprogress.css";
import router from "../router";
import store from "../store";
import { Loading, MessageBox } from 'element-ui';
var loadingIndex = 0;
var loadingBoo;
var timer;
import { showLoading, hideLoading } from "@/utils/requestLoading";
var tiTimer;
// Full config: https://github.com/axios/axios#request-config
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
......@@ -35,9 +34,10 @@ let config = {
};
const _axios = axios.create(config);
var loading;
_axios.interceptors.request.use(
function (config) {
debugger;
//判断是否登录
if (config.url.indexOf('/login/myLoginForm') <= 0) {
if (localStorage.getItem("token")) {
config.headers.Authorization = localStorage.getItem("token");
......@@ -55,10 +55,10 @@ _axios.interceptors.request.use(
}, 200);
}
}
loadingBoo = (!config.loading && typeof config.loading == 'boolean') ? config.loading : true;
if (loadingBoo) {
if (!loading) loading = Loading.service({ fullscreen: true, text: '正在加载...' });
loadingIndex++;
// 判断当前请求是否设置了不显示Loading,默认显示
if (config.loading !== false) {
showLoading(config.headers.loadingTarget); // 如果设置了targer,使用设置的target,比如el-table
}
NProgress.start();
return config;
......@@ -73,29 +73,15 @@ _axios.interceptors.request.use(
// Add a response interceptor
_axios.interceptors.response.use(
function (response) {
NProgress.done();
loadingIndex--;
// console.log('请求后' + loadingIndex)
if (loadingIndex <= 0) {
clearTimeout(timer)
timer = setTimeout(() => {
loading && loading.close();
loading = null
}, 500);
debugger;
if (response.config.loading !== false) {
hideLoading();
}
NProgress.done();
return response;
},
function (error) {
NProgress.done();
loadingIndex--;
if (loadingIndex == 0) {
clearTimeout(timer)
setTimeout(() => {
loading && loading.close();
loading = null;
}, 1200);
}
// Do something with response error
return Promise.reject(error);
}
);
......
/*
* @Author: your name
* @Date: 2021-11-26 16:37:59
* @LastEditTime: 2021-11-26 16:59:01
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\utils\requestLoading.js
*/
import utils from "./util";
import { Loading } from 'element-ui' // 装包方式这样引入,我这里通过cdn引入,通过window.ELEMENT调用
// loading对象
let loading;
// 当前正在请求的数量
let needLoadingRequestCount = 0;
// 显示loading
export function showLoading(target) {
// 后面这个判断很重要,因为关闭时加了抖动,此时loading对象可能还存在,
// 但needLoadingRequestCount已经变成0.避免这种情况下会重新创建个loading
console.log(needLoadingRequestCount, loading);
if (needLoadingRequestCount === 0 && !loading) {
loading = Loading.service({ // 通过cdn引入的element-ui
lock: true,
text: "加载中...",
background: "rgba(255, 255, 255, 0.7)",
target: target || "#micro-apps-container"
});
}
needLoadingRequestCount++;
}
// 隐藏loading
export function hideLoading() {
needLoadingRequestCount--;
needLoadingRequestCount = Math.max(needLoadingRequestCount, 0); // 做个保护
if (needLoadingRequestCount === 0) {
// 关闭loading
toHideLoading();
}
}
// 防抖:将 300ms 间隔内的关闭 loading 便合并为一次。防止连续请求时, loading闪烁的问题。
let toHideLoading = utils.debounce(() => {
loading.close();
loading = null;
}, 500);
......@@ -173,7 +173,51 @@ export default {
}
})
return treeData !== '' ? treeData : data
},
/**
* @desc 函数防抖
* @param func 目标函数
* @param wait 延迟执行毫秒数
* @param immediate true - 立即执行, false - 延迟执行
* 立即执行版的意思是触发事件后函数会立即执行,然后 n 秒内不触发事件才能继续执行函数的效果
非立即执行版的意思是触发事件后函数不会立即执行,而是在 n 秒后执行,如果在 n 秒内又触发了事件,则会重新计算函数执行时间。
*/
debounce(func, wait, immediate) {
let timer;
return function () {
let context = this;
let args = arguments;
if (timer) clearTimeout(timer);
if (immediate) {
let callNow = !timer;
timer = setTimeout(() => {
timer = null;
}, wait);
if (callNow) func.apply(context, args);
} else {
timer = setTimeout(() => {
func.apply(context, args);
}, wait);
}
};
},
// 定时器版-节流
throttle(func, wait) {
let timeout;
return function () {
let context = this;
let args = arguments;
if (!timeout) {
timeout = setTimeout(() => {
timeout = null;
func.apply(context, args);
}, wait);
}
};
}
};
......@@ -123,7 +123,7 @@
style="width: 100%"
:class="{delSelection: !selectBoo}"
@selection-change="handleSelectionChange"
@row-click="handle"
@row-click="isShowRyxxkBtn"
>
<el-table-column
type="selection"
......@@ -438,6 +438,12 @@
:isShowXzry="isShowXzry"
@closeXzry="closeXzry"
> </xzry>
<!-- 人员信息卡 -->
<ryxxk
:isShowRyxxk="isShowRyxxk"
:rowData="rowData"
@closeRyxxk="closeRyxxk"
> </ryxxk>
<!-- <el-drawer
title="我是标题"
......@@ -461,6 +467,7 @@ import dcftpx from "./modules/dcftpx.vue"; //导出FPTX弹窗
import ggrytm from "./modules/ggrytm.vue"; // 更改人员条码弹窗
import fcx from "./modules/fcx.vue"; // 发查询弹窗
import xzry from "./modules/xzry.vue"; // 新增案件
import ryxxk from "./modules/ryxxk.vue"; // 人员信息卡
export default {
name: "AllPersonnelBase",
components: {
......@@ -471,6 +478,7 @@ export default {
ggrytm,
fcx,
xzry,
ryxxk
},
created () {
let w1 = 1920;
......@@ -500,6 +508,7 @@ export default {
isShowFztm: false, //复制条码
isShowFcx: false, //发查询
isShowXzry: false, // 新增人员
isShowRyxxk: false, // 人员信息卡
type: "ry", // 人员还是案件
rowData: {}, // 单行数据
ysxtAsjxgrybh: null,
......@@ -595,6 +604,17 @@ export default {
this.isShowXzry = val;
// this.search();
},
// 人员信息卡操作
isShowRyxxkBtn () {
this.isShowRyxxk = true;
},
closeRyxxk (val) {
//console.log("新增人员关闭", val);
// 增加毛玻璃
this.$bus.emit('isBlur', val)
this.isShowRyxxk = val;
// this.search();
},
// 时间格式化
dateTimeFormat (row, colnum) {
let prop = colnum.property;
......
<template>
<div>
<el-drawer
class="ajxxkDrawer"
title="标题"
:visible.sync="drawer"
:direction="direction"
:before-close="handleClose"
:with-header="false"
:modal='false'
append-to-body
size='36%'
>
<div class="header">
<div class="header-title">人员档案信息</div>
<div
class="header-close"
@click="closeDrawer"
>
<svg
class="icon"
aria-hidden="true"
>
<use xlink:href="#icon-fanhui"></use>
</svg>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: "ryxxk",
props: {
isShowRyxxk: {
type: [Number, String, Boolean],
default: false
},
rowData: {
default: false
}
},
data () {
return {
drawer: false,
direction: 'rtl',
};
},
mounted () {
this.drawer = this.isShowRyxxk;
},
watch: {
isShowRyxxk (newVal, oldVal) {
this.drawer = newVal;
},
drawer (val) {
this.$emit('closeRyxxk', this.drawer);
}
},
methods: {
handleClose (done) {
console.log(1111111111111111)
// this.$confirm('确认关闭?')
// .then(_ => {
// done();
// })
// .catch(_ => { });
this.drawer = false
this.$emit('closeRyxxk', this.drawer);
},
closeDrawer () {
this.drawer = false
this.$emit('closeRyxxk', this.drawer);
}
}
};
</script>
<style lang="scss" scoped>
.ajxxkDrawer {
width: 100%;
height: 100%;
/deep/ .el-drawer.rtl {
overflow: auto;
}
}
.header {
position: fixed;
background: #ffffff;
height: 50px;
width: 688px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
border-bottom: 1px solid #eeeeee;
z-index: 999;
.header-title {
font-size: 16px;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.header-close {
width: 20px;
height: 14px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
.icon {
cursor: pointer;
width: 20px;
height: 14px;
overflow: hidden;
}
}
}
</style>
<template>
<div>
<el-drawer
class="ryxxkDrawer"
title="标题"
:visible.sync="drawer"
:direction="direction"
:before-close="handleClose"
:with-header="false"
:modal='false'
append-to-body
size='36%'
>
<span>我来啦!</span>
<div class="header">
<div class="header-title">人员档案信息</div>
<div
class="header-close"
@click="closeDrawer"
>
<svg
class="icon"
aria-hidden="true"
>
<use xlink:href="#icon-fanhui"></use>
</svg>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: "gz",
name: "ryxxk",
props: {
isShowGz: {
isShowRyxxk: {
type: [Number, String, Boolean],
default: false
},
......@@ -31,21 +48,75 @@ export default {
};
},
mounted () {
this.dialogVisible = this.isShowGz;
this.drawer = this.isShowRyxxk;
},
watch: {
isShowGz (newVal, oldVal) {
this.dialogVisible = newVal;
isShowRyxxk (newVal, oldVal) {
this.drawer = newVal;
},
dialogVisible (val) {
//console.log(this.dialogVisible, 123)
this.$emit('closeGz', this.dialogVisible);
drawer (val) {
this.$emit('closeRyxxk', this.drawer);
}
},
methods: {
handleClose (done) {
console.log(1111111111111111)
// this.$confirm('确认关闭?')
// .then(_ => {
// done();
// })
// .catch(_ => { });
this.drawer = false
this.$emit('closeRyxxk', this.drawer);
},
closeDrawer () {
this.drawer = false
this.$emit('closeRyxxk', this.drawer);
}
}
};
</script>
<style lang="scss" scoped>
.ryxxkDrawer {
width: 100%;
height: 100%;
/deep/ .el-drawer.rtl {
overflow: auto;
}
}
.header {
position: fixed;
background: #ffffff;
height: 50px;
width: 688px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
border-bottom: 1px solid #eeeeee;
z-index: 999;
.header-title {
font-size: 16px;
font-family: MicrosoftYaHei;
color: #282f3c;
}
.header-close {
width: 20px;
height: 14px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
.icon {
cursor: pointer;
width: 20px;
height: 14px;
overflow: hidden;
}
}
}
</style>
......@@ -473,6 +473,7 @@ export default {
checkedTargetsRight: [], // 选定逻辑库
targetsRight: targetOptions_aj, // 逻辑库列表
isIndeterminateRight: false, // 逻辑库全选状态
newArr: []
};
},
created () {
......@@ -572,106 +573,125 @@ export default {
},
// 获取文件列表
onChange (file, fileList) {
// //console.log(file.raw, 2222233333)
//console.log(fileList[0], 1111)
// console.log(file.raw, 2222233333)
if (this.timer2) clearTimeout(this.timer2);
this.timer2 = setTimeout(() => {
this.paramsArr = fileList;
console.log(file)
let name = file.raw.webkitRelativePath.split('/')[0];
let obj = {};
obj.index = this.newArr.length + 1;
let childrenArr = fileList.filter((i) => i.raw.webkitRelativePath.indexOf(name) >= 0);
console.log(childrenArr)
obj.children = childrenArr.map((i, index) => {
i.index = (obj.index) + '-' + (index + 1);
i.neivx = index + 1;
return i
});
this.newArr.push(obj);
console.log(this.newArr, this.paramsArr)
}, 200)
// 重复文件过滤
let existFile = fileList.slice(0, fileList.length - 1).find(f => f.name === file.name)
if (existFile) {
this.$message.error('当前文件已经存在!');
fileList.pop()
}
// let existFile = fileList.slice(0, fileList.length - 1).find(f => f.name === file.name)
// if (existFile) {
// this.$message.error('当前文件已经存在!');
// fileList.pop()
// }
// 获取文件夹
// var folder = fileList[0].raw.webkitRelativePath.split("/");
// //console.log('fffff', folder[0])
let that = this;
let newlist = fileList;
for (let i = 0; i < fileList.length; i++) {
let file = fileList[i].raw
// //console.log(file.webkitRelativePath, 999)
var reader = new FileReader();
reader.readAsText(file);
if (this.drlx == 3) {
that.action = '/api/upload/person'
reader.onload = function () {
const reg = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
let barcode = this.result.match(reg)
that.$set(newlist[i], 'barcode', barcode[1])
}
} else if (this.drlx == 6) {
that.action = '/api/upload/case'
reader.onload = function () {
const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
let barcode = this.result.match(reg)
that.$set(newlist[i], 'barcode', barcode[1])
}
} else if (this.drlx == 9) {
reader.onload = function () {
let result = this.result;
const reg = /\<nyzw_zzhwbdffdm\>(.*?)\<\/nyzw_zzhwbdffdm\>/ // 正查,倒查
const regTT = /\<TTHitResultPackage\>(.*?)\<\/TTHitResultPackage\>/ // 查重
//正查,倒查
let regTypes = result.match(reg)
let regType = null;
if (regTypes != null) {
regType = regTypes[1]
//console.log('regType', regType)
}
//console.log('regType', regType)
//查重
let TT = result.match(regTT)
//console.log('TT', TT)
if (regType != '' && regType != null && regType != undefined && regType == "1") { // TL 倒查
// that.action = '/api/upload/lthitresult'
that.action = '/api/upload/hitresult'
// that.$set(data, 'action', '/api/upload/lthitresult')
// //console.log('地址', this.action)
const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
let barcode1 = result.match(reg1)
let barcode2 = result.match(reg2)
//console.log('倒查', barcode1, barcode2)
that.$set(newlist[i], 'type', regType)
that.$set(newlist[i], 'barcode1', barcode1[1])
that.$set(newlist[i], 'barcode2', barcode2[1])
} else if (regType != '' && regType != null && regType != undefined && regType == "2") { // LT 正查
// that.action = '/api/upload/lthitresult'
that.action = '/api/upload/hitresult'
// //console.log('地址', this.action)
// that.$set(data, 'action', '/api/upload/lthitresult')
const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
let barcode1 = result.match(reg1)
let barcode2 = result.match(reg2)
//console.log('正查', barcode1, barcode2)
that.$set(newlist[i], 'type', regType)
that.$set(newlist[i], 'barcode1', barcode2[1])
that.$set(newlist[i], 'barcode2', barcode1[1])
} else if (regType == null) { // TT 查重
// that.action = '/api/upload/tthitresult'
that.action = '/api/upload/hitresult'
// that.$set(data, 'action', '/api/upload/tthitresult')
// //console.log('地址', this.action)
const reg1 = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
const reg2 = /\<bzjg_ysxt_asjxgrybh\>(.*?)\<\/bzjg_ysxt_asjxgrybh\>/
let barcode1 = result.match(reg1)
let barcode2 = result.match(reg2)
//console.log('查重', barcode1, barcode2)
that.$set(newlist[i], 'type', '0')
that.$set(newlist[i], 'barcode1', barcode1[1])
that.$set(newlist[i], 'barcode2', barcode2[1])
}
// const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
// let barcode = this.result.match(reg)
// that.$set(newlist[i], 'barcode', barcode[1])
}
}
}
//console.log('newlist', newlist)
this.datas = newlist;
// //console.log('datas', this.datas)
var folder = fileList[0].raw.webkitRelativePath.split("/");
// console.log('fffff', folder[0])
// let that = this;
// let newlist = fileList;
// for (let i = 0; i < fileList.length; i++) {
// let file = fileList[i].raw
// // console.log(file.webkitRelativePath, 999)
// var reader = new FileReader();
// reader.readAsText(file);
// if (this.drlx == 3) {
// that.action = '/api/upload/person'
// reader.onload = function () {
// const reg = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
// let barcode = this.result.match(reg)
// that.$set(newlist[i], 'barcode', barcode[1])
// }
// } else if (this.drlx == 6) {
// that.action = '/api/upload/case'
// reader.onload = function () {
// const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
// let barcode = this.result.match(reg)
// that.$set(newlist[i], 'barcode', barcode[1])
// }
// } else if (this.drlx == 9) {
// reader.onload = function () {
// let result = this.result;
// const reg = /\<nyzw_zzhwbdffdm\>(.*?)\<\/nyzw_zzhwbdffdm\>/ // 正查,倒查
// const regTT = /\<TTHitResultPackage\>(.*?)\<\/TTHitResultPackage\>/ // 查重
// //正查,倒查
// let regTypes = result.match(reg)
// let regType = null;
// if (regTypes != null) {
// regType = regTypes[1]
// console.log('regType', regType)
// }
// console.log('regType', regType)
// //查重
// let TT = result.match(regTT)
// console.log('TT', TT)
// if (regType != '' && regType != null && regType != undefined && regType == "1") { // TL 倒查
// // that.action = '/api/upload/lthitresult'
// that.action = '/api/upload/hitresult'
// // that.$set(data, 'action', '/api/upload/lthitresult')
// // console.log('地址', this.action)
// const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
// const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
// let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2)
// console.log('倒查', barcode1, barcode2)
// that.$set(newlist[i], 'type', regType)
// that.$set(newlist[i], 'barcode1', barcode1[1])
// that.$set(newlist[i], 'barcode2', barcode2[1])
// } else if (regType != '' && regType != null && regType != undefined && regType == "2") { // LT 正查
// // that.action = '/api/upload/lthitresult'
// that.action = '/api/upload/hitresult'
// // console.log('地址', this.action)
// // that.$set(data, 'action', '/api/upload/lthitresult')
// const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
// const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
// let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2)
// console.log('正查', barcode1, barcode2)
// that.$set(newlist[i], 'type', regType)
// that.$set(newlist[i], 'barcode1', barcode2[1])
// that.$set(newlist[i], 'barcode2', barcode1[1])
// } else if (regType == null) { // TT 查重
// // that.action = '/api/upload/tthitresult'
// that.action = '/api/upload/hitresult'
// // that.$set(data, 'action', '/api/upload/tthitresult')
// // console.log('地址', this.action)
// const reg1 = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
// const reg2 = /\<bzjg_ysxt_asjxgrybh\>(.*?)\<\/bzjg_ysxt_asjxgrybh\>/
// let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2)
// console.log('查重', barcode1, barcode2)
// that.$set(newlist[i], 'type', '0')
// that.$set(newlist[i], 'barcode1', barcode1[1])
// that.$set(newlist[i], 'barcode2', barcode2[1])
// }
// // const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
// // let barcode = this.result.match(reg)
// // that.$set(newlist[i], 'barcode', barcode[1])
// }
// }
// }
// console.log('newlist', newlist)
// this.datas = newlist;
// console.log('datas', this.datas)
},
// 提交前钩子函数
beforeUpload () {
......
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