拆分导入成功列表刷新

This commit is contained in:
caoyang
2022-04-02 13:44:05 +08:00
parent b4059adf00
commit ce285c1dfb
8 changed files with 380 additions and 21 deletions
@@ -7,6 +7,7 @@
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')" @change="onLeftChange" @search="onSearch" />
<a-tree
v-if="gData.length>0"
:selected-keys="selectedKeys"
:expanded-keys="expandedKeys"
:auto-expand-parent="autoExpandParent"
:defaultExpandAll="true"
@@ -38,7 +39,8 @@
<div class="split-detail-right">
<div class="split-detail-right-wraper">
<div class="split-detail-search-header">
<search :flag="'4'" :url="url"/>
<search :flag="'4'" :url="url" :infoId="$route.query.infoId"
:menuId="menuId" @resetSearch="resetSearch" />
</div>
<div class="table-operator">
<div class="operator-text" @click="handleCopyManage">
@@ -161,7 +163,7 @@
<script>
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
import search from '@/components/search/index'
import search from '@/components/SplitSearch/index'
import TableData from '@/components/SplitDetailTable/index'
// import upload from '@/components/uploadFile/file.vue'
import SplitBatForm from '@/components/SplitBatForm/index'
@@ -262,7 +264,8 @@
ids:'',
token:Vue.ls.get(ACCESS_TOKEN),
// upAccept:'.zip', //导入文件类型
uploadMenuId:''
uploadMenuId:'',
selectedKeys:[]
}
},
mounted() {
@@ -410,6 +413,13 @@
onSelect(selectedKeys){
this.menuId=selectedKeys[0]
this.uploadMenuId=selectedKeys[0]
this.selectedKeys=selectedKeys
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
// console.log('sele',selectedKeys)
// console.log('uploadMenuId',this.uploadMenuId)
@@ -443,7 +453,13 @@
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
@@ -451,6 +467,12 @@
}
})
},
//清空按钮
resetSearch(){
this.menuId=''
this.uploadMenuId=''
this.selectedKeys=[]
},
handleCancelMenuRight(){
this.menuRightVisible=false
},
@@ -477,7 +499,13 @@
this.onExpand(expandId)
this.form={}
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -580,7 +608,13 @@
this.$message.success(this.$t('OperationSuccessful'))
// this.loadData()
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
@@ -618,15 +652,26 @@
},
//上传成功
uploadSuccess(data){
uploadSuccess(data,status){
console.log('data111',data)
if(status==='success'){
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
this.loadMenuData()
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
}
let attIdList = []
if(data && data.length > 0){
data.forEach(item => {
attIdList.push(item.id || data.name)
})
this.attId = attIdList.join(',')
this.loadMenuData()
eventBUs.$emit('searchReset')
// eventBUs.$emit('searchReset')
}
},
//导出
@@ -670,7 +715,13 @@
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
this.selectedRowKeys=[]
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -738,7 +789,13 @@
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -800,7 +857,13 @@
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
eventBUs.$emit('searchReset')
let queryParam={
menu_id:this.menuId,
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
}else{
this.$message.warning(this.$t('operationFailed'))
}