拆分查询导出

This commit is contained in:
caoyang
2022-04-07 17:58:12 +08:00
parent 008d81045f
commit 9c2c9570e9
3 changed files with 39 additions and 17 deletions
@@ -200,6 +200,7 @@
} }
// console.log('11111',queryParam) // console.log('11111',queryParam)
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam))) eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
this.$emit('queryParams',this.queryParam)
}, },
searchReset() { searchReset() {
this.queryParam = { this.queryParam = {
@@ -208,6 +209,7 @@
} }
// console.log('queryparamssss',this.queryParam) // console.log('queryparamssss',this.queryParam)
this.$emit('resetSearch') this.$emit('resetSearch')
this.$emit('queryParams',{})
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam))) eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
}, },
getSeach() { getSeach() {
@@ -1,5 +1,5 @@
<template> <template>
<div class="split-detail" @click="clearMenu"> <div class="split-detail" @click="clearMenu" :style="'width:' + (fullWidth - 200) + 'px'">
<a-card :bordered="false" > <a-card :bordered="false" >
<div class="split-detail-wrap"> <div class="split-detail-wrap">
<div class="split-detail-left"> <div class="split-detail-left">
@@ -58,7 +58,7 @@
<div class="split-detail-right-wraper"> <div class="split-detail-right-wraper">
<div class="split-detail-search-header"> <div class="split-detail-search-header">
<search :flag="'4'" :url="url" :infoId="$route.query.infoId" <search :flag="'4'" :url="url" :infoId="$route.query.infoId"
:menuId="menuId" @resetSearch="resetSearch" /> :menuId="menuId" @resetSearch="resetSearch" @queryParams="queryParamsValues" />
</div> </div>
<div class="table-operator"> <div class="table-operator">
<div class="operator-text" @click="handleCopyManage"> <div class="operator-text" @click="handleCopyManage">
@@ -286,27 +286,24 @@
uploadMenuId:'', uploadMenuId:'',
selectedKeys:[], selectedKeys:[],
deleteNode:false, deleteNode:false,
fullWidth:'',
parameter:{}
} }
}, },
watch:{ watch:{
deleteNode(){ deleteNode(){
} },
}, },
computed:{ computed:{
}, },
mounted() { mounted() {
// let widthBrown = document.documentElement.offsetWidth || document.body.offsetWidth
// let client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
// let width = widthBrown - client.left
// console.log('width111',width)
//
// document.querySelector('.split-detail-table .ant-table-content').style.width=width+'px'
// window.fullHeight = document.documentElement.clientHeight
// that.fullHeight = window.fullHeight
let widthBrown = document.documentElement.offsetWidth || document.body.offsetWidth
let client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
let width = widthBrown - client.left
document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
this.infoId=this.$route.query.infoId this.infoId=this.$route.query.infoId
// console.log('info',this.$route.query) // console.log('info',this.$route.query)
@@ -721,14 +718,25 @@
// eventBUs.$emit('searchReset') // eventBUs.$emit('searchReset')
} }
}, },
queryParamsValues(search){
Object.keys(search).forEach(res => {
if (search[res] instanceof Array) {
search[res] = search[res].join(',')
}
})
this.parameter=search
this.parameter.info_id=this.infoId
this.parameter.menu_id=this.menuId
},
//导出 //导出
handleExportManage(){ handleExportManage(){
let dateName = moment(new Date()).format('YYYY-MM-DD HH-mm-ss') let dateName = moment(new Date()).format('YYYY-MM-DD HH-mm-ss')
let name = this.$route.query.infoNumber +' '+ dateName+'.zip' let name = this.$route.query.infoNumber +' '+ dateName+'.zip'
let query = { let query = {
infoId:this.infoId, exportName: this.$route.query.infoNumber + ' ' + dateName,
exportName:this.$route.query.infoNumber +' '+ dateName, idList: this.selectedRowKeys.join(','),
idList:this.selectedRowKeys.join(',') parameter: this.parameter
} }
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query) downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query)
@@ -1077,6 +1085,9 @@
<style lang="less" scoped> <style lang="less" scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.main{
}
.split-detail{ .split-detail{
.split-detail-wrap{ .split-detail-wrap{
display: flex; display: flex;
@@ -1199,6 +1210,11 @@
} }
} }
} }
.split-detail-table{
.ant-table-body{
overflow: auto!important;
}
}
.item-content-show{ .item-content-show{
.wordImg{ .wordImg{
width: 40px; width: 40px;
@@ -331,12 +331,16 @@
this.loadShowArea() this.loadShowArea()
// console.log('edit',this.submitEdit) // console.log('edit',this.submitEdit)
if(this.submitEdit==='add'){ if(this.submitEdit==='add'){
if(this.submitKey==='1'){
this.form.isModel='1'
}else if(this.submitKey==='2'){
this.form.isModel='0'
}
this.disabledEdit=false this.disabledEdit=false
}else if(this.submitEdit==='edit'){ }else if(this.submitEdit==='edit'){
this.disabledEdit=true this.disabledEdit=true
this.form={...this.editData}
} }
this.form={...this.editData}
// console.log('drawerVisible',this.drawerVisible)
}, },
methods: { methods: {
//获取选项内容 //获取选项内容