Commit 050311f8 by liyuhang19990520

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

parents 0a6a0440 07ef6bb2
...@@ -287,9 +287,9 @@ export default { ...@@ -287,9 +287,9 @@ export default {
}, },
data () { data () {
return { return {
drawer: true, // 抽屉开关 drawer: false, // 抽屉开关
direction: 'rtl', // 抽屉类型 direction: 'rtl', // 抽屉类型
radio1: 3, // 指纹,掌纹,人像 radio1: 1, // 指纹,掌纹,人像
}; };
}, },
mounted () { mounted () {
......
...@@ -473,7 +473,11 @@ export default { ...@@ -473,7 +473,11 @@ export default {
checkedTargetsRight: [], // 选定逻辑库 checkedTargetsRight: [], // 选定逻辑库
targetsRight: targetOptions_aj, // 逻辑库列表 targetsRight: targetOptions_aj, // 逻辑库列表
isIndeterminateRight: false, // 逻辑库全选状态 isIndeterminateRight: false, // 逻辑库全选状态
newArr: [] newArr: [],
logicList: [] // 目标逻辑库数组
}; };
}, },
created () { created () {
...@@ -574,26 +578,29 @@ export default { ...@@ -574,26 +578,29 @@ export default {
// 获取文件列表 // 获取文件列表
onChange (file, fileList) { onChange (file, fileList) {
// console.log(file.raw, 2222233333) // 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); // if (this.timer2) clearTimeout(this.timer2);
console.log(this.newArr, this.paramsArr) // this.timer2 = setTimeout(() => {
}, 200) // 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)
// 重复文件过滤 // 重复文件过滤
...@@ -605,170 +612,242 @@ export default { ...@@ -605,170 +612,242 @@ export default {
// 获取文件夹 // 获取文件夹
var folder = fileList[0].raw.webkitRelativePath.split("/"); var folder = fileList[0].raw.webkitRelativePath.split("/");
// console.log('fffff', folder[0]) console.log('fffff', folder[0])
// let that = this; let that = this;
// let newlist = fileList; let newlist = fileList;
// for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
// let file = fileList[i].raw let file = fileList[i].raw
// // console.log(file.webkitRelativePath, 999) // console.log(file.webkitRelativePath, 999)
// var reader = new FileReader(); var reader = new FileReader();
// reader.readAsText(file); reader.readAsText(file);
// if (this.drlx == 3) { if (this.drlx == 3) {
// that.action = '/api/upload/person' that.action = '/api/upload/person'
// reader.onload = function () { reader.onload = function () {
// const reg = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/ const reg = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
// let barcode = this.result.match(reg) let barcode = this.result.match(reg)
// that.$set(newlist[i], 'barcode', barcode[1]) that.$set(newlist[i], 'barcode', barcode[1])
// } }
// } else if (this.drlx == 6) { } else if (this.drlx == 6) {
// that.action = '/api/upload/case' that.action = '/api/upload/case'
// reader.onload = function () { reader.onload = function () {
// const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/ const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
// let barcode = this.result.match(reg) let barcode = this.result.match(reg)
// that.$set(newlist[i], 'barcode', barcode[1]) that.$set(newlist[i], 'barcode', barcode[1])
// } }
// } else if (this.drlx == 9) { } else if (this.drlx == 9) {
// reader.onload = function () { reader.onload = function () {
// let result = this.result; let result = this.result;
// const reg = /\<nyzw_zzhwbdffdm\>(.*?)\<\/nyzw_zzhwbdffdm\>/ // 正查,倒查 const reg = /\<nyzw_zzhwbdffdm\>(.*?)\<\/nyzw_zzhwbdffdm\>/ // 正查,倒查
// const regTT = /\<TTHitResultPackage\>(.*?)\<\/TTHitResultPackage\>/ // 查重 const regTT = /\<TTHitResultPackage\>(.*?)\<\/TTHitResultPackage\>/ // 查重
// //正查,倒查 //正查,倒查
// let regTypes = result.match(reg) let regTypes = result.match(reg)
// let regType = null; let regType = null;
// if (regTypes != null) { if (regTypes != null) {
// regType = regTypes[1] regType = regTypes[1]
// console.log('regType', regType) console.log('regType', regType)
// } }
// console.log('regType', regType) console.log('regType', regType)
// //查重 //查重
// let TT = result.match(regTT) let TT = result.match(regTT)
// console.log('TT', TT) console.log('TT', TT)
// if (regType != '' && regType != null && regType != undefined && regType == "1") { // TL 倒查 if (regType != '' && regType != null && regType != undefined && regType == "1") { // TL 倒查
// // that.action = '/api/upload/lthitresult' // that.action = '/api/upload/lthitresult'
// that.action = '/api/upload/hitresult' that.action = '/api/upload/hitresult'
// // that.$set(data, 'action', '/api/upload/lthitresult') // that.$set(data, 'action', '/api/upload/lthitresult')
// // console.log('地址', this.action) // console.log('地址', this.action)
// const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/ const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
// const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/ const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
// let barcode1 = result.match(reg1) let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2) let barcode2 = result.match(reg2)
// console.log('倒查', barcode1, barcode2) console.log('倒查', barcode1, barcode2)
// that.$set(newlist[i], 'type', regType) that.$set(newlist[i], 'type', regType)
// that.$set(newlist[i], 'barcode1', barcode1[1]) that.$set(newlist[i], 'barcode1', barcode1[1])
// that.$set(newlist[i], 'barcode2', barcode2[1]) that.$set(newlist[i], 'barcode2', barcode2[1])
// } else if (regType != '' && regType != null && regType != undefined && regType == "2") { // LT 正查 } else if (regType != '' && regType != null && regType != undefined && regType == "2") { // LT 正查
// // that.action = '/api/upload/lthitresult' // that.action = '/api/upload/lthitresult'
// that.action = '/api/upload/hitresult' that.action = '/api/upload/hitresult'
// // console.log('地址', this.action) // console.log('地址', this.action)
// // that.$set(data, 'action', '/api/upload/lthitresult') // that.$set(data, 'action', '/api/upload/lthitresult')
// const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/ const reg1 = /\<nyzw_ysxt_asjxgrybh\>(.*?)\<\/nyzw_ysxt_asjxgrybh\>/
// const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/ const reg2 = /\<xczw_ysxt_asjbh\>(.*?)\<\/xczw_ysxt_asjbh\>/
// let barcode1 = result.match(reg1) let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2) let barcode2 = result.match(reg2)
// console.log('正查', barcode1, barcode2) console.log('正查', barcode1, barcode2)
// that.$set(newlist[i], 'type', regType) that.$set(newlist[i], 'type', regType)
// that.$set(newlist[i], 'barcode1', barcode2[1]) that.$set(newlist[i], 'barcode1', barcode2[1])
// that.$set(newlist[i], 'barcode2', barcode1[1]) that.$set(newlist[i], 'barcode2', barcode1[1])
// } else if (regType == null) { // TT 查重 } else if (regType == null) { // TT 查重
// // that.action = '/api/upload/tthitresult' // that.action = '/api/upload/tthitresult'
// that.action = '/api/upload/hitresult' that.action = '/api/upload/hitresult'
// // that.$set(data, 'action', '/api/upload/tthitresult') // that.$set(data, 'action', '/api/upload/tthitresult')
// // console.log('地址', this.action) // console.log('地址', this.action)
// const reg1 = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/ const reg1 = /\<ysxt_asjxgrybh\>(.*?)\<\/ysxt_asjxgrybh\>/
// const reg2 = /\<bzjg_ysxt_asjxgrybh\>(.*?)\<\/bzjg_ysxt_asjxgrybh\>/ const reg2 = /\<bzjg_ysxt_asjxgrybh\>(.*?)\<\/bzjg_ysxt_asjxgrybh\>/
// let barcode1 = result.match(reg1) let barcode1 = result.match(reg1)
// let barcode2 = result.match(reg2) let barcode2 = result.match(reg2)
// console.log('查重', barcode1, barcode2) console.log('查重', barcode1, barcode2)
// that.$set(newlist[i], 'type', '0') that.$set(newlist[i], 'type', '0')
// that.$set(newlist[i], 'barcode1', barcode1[1]) that.$set(newlist[i], 'barcode1', barcode1[1])
// that.$set(newlist[i], 'barcode2', barcode2[1]) that.$set(newlist[i], 'barcode2', barcode2[1])
// } }
// // const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/ // const reg = /\<ysxt_asjbh\>(.*?)\<\/ysxt_asjbh\>/
// // let barcode = this.result.match(reg) // let barcode = this.result.match(reg)
// // that.$set(newlist[i], 'barcode', barcode[1]) // that.$set(newlist[i], 'barcode', barcode[1])
// } }
// } }
// } }
// console.log('newlist', newlist) console.log('newlist', newlist)
// this.datas = newlist; this.datas = newlist;
// console.log('datas', this.datas) console.log('datas', this.datas)
}, },
// 提交前钩子函数 // 提交前钩子函数
beforeUpload () { beforeUpload () {
// //console.log('数据liebiao', this.$refs.upload.uploadFiles) // //console.log('数据liebiao', this.$refs.upload.uploadFiles)
}, },
// 上传 // 上传
// submitUpload () {
// console.log('逻辑库', this.checkedTargets)
// let logicList = []
// for (var i = 0; i < this.checkedTargets.length; i++) {
// }
// },
submitUpload () { submitUpload () {
let that = this
if (this.nowSelectRightData.length == 0) { if (this.nowSelectRightData.length == 0) {
this.$message.error('请选择要上传的文件') this.$message.error('请选择要上传的文件')
} else { } else {
// 创建一个空的FormData对象: if (this.drlx == 3 || this.drlx == 6) {
const formData = new FormData() if (this.checkedTargets == 0) {
// 可以使用FormData.append来添加键/值对到表单里面; this.$message.error('请选择逻辑分库')
this.nowSelectRightData.forEach((file) => { } else {
formData.append('file', file.raw) if (this.drlx == 3) {
}) for (var i = 0; i < this.checkedTargets.length; i++) {
// 添加自定义参数,不传可删除 if (this.checkedTargets[i] == '基本人员库') {
// formData.append('parentId', '49') this.logicList.push('1')
} else if (this.checkedTargets[i] == '高危人员库') {
this.logicList.push('2')
} else if (this.checkedTargets[i] == '非法人员库') {
this.logicList.push('3')
} else if (this.checkedTargets[i] == '在逃人员库') {
this.logicList.push('4')
} else if (this.checkedTargets[i] == '布控人员库') {
this.logicList.push('5')
} else if (this.checkedTargets[i] == '前科人员库') {
this.logicList.push('6')
} else if (this.checkedTargets[i] == '协查人员库') {
this.logicList.push('7')
}
}
} else if (this.drlx == 6) { // ['本地案件库', '比中案件库', '已破案件库', '重大案件库', 'B类案件库', 'C类案件库', '', '协查案件库'];
for (var i = 0; i < this.checkedTargets.length; i++) {
if (this.checkedTargets[i] == '本地案件库') {
this.logicList.push('1')
} else if (this.checkedTargets[i] == '比中案件库') {
this.logicList.push('2')
} else if (this.checkedTargets[i] == '已破案件库') {
this.logicList.push('3')
} else if (this.checkedTargets[i] == '重大案件库') {
this.logicList.push('4')
} else if (this.checkedTargets[i] == 'B类案件库') {
this.logicList.push('5')
} else if (this.checkedTargets[i] == 'C类案件库') {
this.logicList.push('6')
} else if (this.checkedTargets[i] == '勘查案件库') {
this.logicList.push('7')
} else if (this.checkedTargets[i] == '协查案件库') {
this.logicList.push('8')
}
}
}
this.upload()
}
} else if (this.drlx == 9) {
if (this.targetsLeft.length == 0 || this.targetsRight.length == 0) {
this.$message.error('请选择逻辑分库')
} else {
this.upload()
}
}
//console.log('formData', formData)
// //console.log('this.selectArr', this.selectArr)
// //console.log('this.nowSelectRightData', this.nowSelectRightData)
// this.$refs.upload.uploadFiles = formData
// //console.log('this.$refs.upload.uploadFiles', this.$refs.upload.uploadFiles)
// this.$refs.upload.submit();
this.dialogVisible = true;
this.$axios({
method: 'post',
url: this.action,
data: formData,
loading: false,
onUploadProgress: function (progressEvent) {
// this.dialogVisible = true;
//console.log(progressEvent, 1);
that.UploadPercent = (((progressEvent.loaded / 10 * 9.9) / progressEvent.total) * 100).toFixed(2)
//console.log(that.UploadPercent, 123)
// Number(event.percent.toFixed())
},
}).then(res => {
if (res.data.code === 0) {
// this.tableDate = response.data.ret.list;
// this.reqParam.page.total = response.data.ret.total;
if (this.drlx == 3 || this.drlx == 6) {
this.successCount = res.data.ret.successCount
this.failCount = res.data.ret.failCount
this.showProgress = false;
this.selectArr = [] // 右边列表
this.datas = []// 左边表格数据项
this.nowSelectData = [] // 左边选中列表数据
this.nowSelectRightData = [] // 右边选中列表数据
} else if (this.drlx == 9) { }
this.successCount = res.data.ret.successCount
this.failCount = res.data.ret.failCount
this.showProgress = false;
this.selectArr = [] // 右边列表
this.datas = []// 左边表格数据项 },
this.nowSelectData = [] // 左边选中列表数据
this.nowSelectRightData = [] // 右边选中列表数据 // 上传文件函数
} upload () {
// this.$refs.upload.clearFiles() let that = this
// 创建一个空的FormData对象:
const formData = new FormData()
// 可以使用FormData.append来添加键/值对到表单里面;
this.nowSelectRightData.forEach((file) => {
formData.append('file', file.raw)
})
// 添加自定义参数,不传可删除
formData.append('logicList', this.logicList)
//console.log('formData', formData)
// //console.log('this.selectArr', this.selectArr)
// //console.log('this.nowSelectRightData', this.nowSelectRightData)
// this.$refs.upload.uploadFiles = formData
// //console.log('this.$refs.upload.uploadFiles', this.$refs.upload.uploadFiles)
// this.$refs.upload.submit();
this.dialogVisible = true;
this.$axios({
method: 'post',
url: this.action,
data: formData,
loading: false,
onUploadProgress: function (progressEvent) {
// this.dialogVisible = true;
//console.log(progressEvent, 1);
that.UploadPercent = (((progressEvent.loaded / 10 * 9.9) / progressEvent.total) * 100).toFixed(2)
//console.log(that.UploadPercent, 123)
// Number(event.percent.toFixed())
},
}).then(res => {
if (res.data.code === 0) {
// this.tableDate = response.data.ret.list;
// this.reqParam.page.total = response.data.ret.total;
if (this.drlx == 3 || this.drlx == 6) {
this.successCount = res.data.ret.successCount
this.failCount = res.data.ret.failCount
this.showProgress = false; this.showProgress = false;
//console.info("查询结果===>", res);
// this.userInfo = this.getUserInfo(this.tableDate);
} else {
this.$message.error(res.data.message);
}
});
}
this.selectArr = [] // 右边列表
this.datas = []// 左边表格数据项
this.nowSelectData = [] // 左边选中列表数据
this.nowSelectRightData = [] // 右边选中列表数据
this.logicList = [] // 目标逻辑库
} else if (this.drlx == 9) {
this.successCount = res.data.ret.successCount
this.failCount = res.data.ret.failCount
this.showProgress = false;
this.selectArr = [] // 右边列表
this.datas = []// 左边表格数据项
this.nowSelectData = [] // 左边选中列表数据
this.nowSelectRightData = [] // 右边选中列表数据
}
// this.$refs.upload.clearFiles()
this.showProgress = false;
//console.info("查询结果===>", res);
// this.userInfo = this.getUserInfo(this.tableDate);
} else {
this.$message.error(res.data.message);
}
});
}, },
// 删除文件 // 删除文件
handleRemove (file, fileList) { handleRemove (file, fileList) {
//console.log(file, fileList); //console.log(file, fileList);
......
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