Browse Source

【接口看板】接口发出记录及历史记录重发处理

master
安虹睿 1 year ago
parent
commit
edde990200
  1. 61
      PC/InterFace.Dash/src/views/menuList/OutgoingData.vue
  2. 26
      PC/InterFace.Dash/src/views/menuList/OutgoingDataHistory.vue

61
PC/InterFace.Dash/src/views/menuList/OutgoingData.vue

@ -1,6 +1,7 @@
<template>
<div class="page-box" v-loading="Loading.tableLoading">
<tablePagination
ref="tablePagination_Ref"
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
@ -10,7 +11,7 @@
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@topbutton="topbuttonHandle"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@ -27,6 +28,8 @@
@buttonOperationClick_right="buttonOperationClick_right"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:tableSelection="true"
:selectionColumnHandle="selectionColumnHandle"
></tablePagination>
<!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" -->
@ -89,6 +92,14 @@ export default {
isRedundance:true,
isDetailExport:true
}),//
{
type: "danger",
icon: "el-icon-finished",
label: '批量重推',
name: "isRepushMany",
size: "mini",
isNoPermission:true
},
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
@ -99,6 +110,34 @@ export default {
this.paging();
},
methods:{
selectionColumnHandle(data,index){
return data.status == '-1' || data.status == '-2' || data.status == '-3' || data.status == '-4'
},
//
repushHttpHandle(ids){
if(!ids || ids.length <= 0){
this.$warningMsg('请选择一条数据')
return
}
let _tip = `您确定要重新推送吗?`
if(ids.length > 1){_tip = `您确定要重新推送【${ids.length}】条数据吗?`}
this.$confirm(_tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.tableLoading = true;
resetHandle({remark:null},ids,'out-going-data').then(result => {
this.$successMsg("重推成功");
this.paging()
this.$refs.tablePagination_Ref.clearTableSelection();
}).catch(()=>{
this.Loading.tableLoading = false;
})
}).catch((err) => {
console.log(err)
});
},
buttonOperationList_right(data){
let _btn = [{
label:'重新推送',
@ -112,15 +151,19 @@ export default {
},
buttonOperationClick_right(row, item, index){
if(item.name == 'isRepush'){
this.Loading.tableLoading = true;
resetHandle({remark:null},[row.id],'out-going-data').then(result => {
this.$successMsg("重推成功");
this.paging()
}).catch(()=>{
this.Loading.tableLoading = false;
})
this.repushHttpHandle([row.id])
}
},
topbuttonHandle(row){
//
if(row == 'isRepushMany'){
let _ids = []
this.multipleSelection.forEach(item=>{_ids.push(item.id)})
this.repushHttpHandle(_ids)
}else{
this.topbutton(row)
}
}
},
}
}
</script>

26
PC/InterFace.Dash/src/views/menuList/OutgoingDataHistory.vue

@ -23,8 +23,6 @@
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_right="buttonOperationList_right"
@buttonOperationClick_right="buttonOperationClick_right"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
></tablePagination>
@ -98,30 +96,6 @@ export default {
mounted() {
this.paging();
},
methods:{
buttonOperationList_right(data){
let _btn = [{
label:'重新推送',
name:'isRepush',
hide:true
}]
if(data.status == '-1'){
_btn[0].hide = false
}
return _btn
},
buttonOperationClick_right(row, item, index){
if(item.name == 'isRepush'){
this.Loading.tableLoading = true;
resetHandle({remark:null},[row.id],'out-going-data-history').then(result => {
this.$successMsg("重推成功");
this.paging()
}).catch(()=>{
this.Loading.tableLoading = false;
})
}
}
}
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save