修改导出问题、检索重新按时间排序
This commit is contained in:
parent
fba81eb17e
commit
f7406250b1
@ -6,6 +6,7 @@
|
|||||||
<div class="contentPopover" v-if="show">
|
<div class="contentPopover" v-if="show">
|
||||||
<div class="bodyMain">
|
<div class="bodyMain">
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
|
<template v-if="listIsType">
|
||||||
<div v-for="item in list" :key="item">
|
<div v-for="item in list" :key="item">
|
||||||
<div v-if="list.length>0 && type == item.type">
|
<div v-if="list.length>0 && type == item.type">
|
||||||
<div class="exportHeader">
|
<div class="exportHeader">
|
||||||
@ -20,6 +21,15 @@
|
|||||||
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" />
|
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<div v-else>
|
||||||
|
<div>
|
||||||
|
<div class="exportHeader">
|
||||||
|
<div class="exportName">正在解析中...</div>
|
||||||
|
</div>
|
||||||
|
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" percentage="0" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -36,6 +46,13 @@ export default {
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
|
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
listIsType(){
|
||||||
|
let arr = this.$TOOL.objCopy(this.list);
|
||||||
|
arr = arr.filter(item => item.type && item.type == this.type);
|
||||||
|
return arr.length && arr.length > 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export default {
|
|||||||
searchList:{
|
searchList:{
|
||||||
handler(val){
|
handler(val){
|
||||||
if(val && val.length>0){
|
if(val && val.length>0){
|
||||||
this.columnList = val.filter(em=> !em.hide && em.is_search);
|
this.columnList = this.sortData(this.$TOOL.objCopy(val.filter(em=> !em.hide && em.is_search)));
|
||||||
this.params = this.groupByType(val);
|
this.params = this.groupByType(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -123,6 +123,26 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 排序
|
||||||
|
sortData(list){
|
||||||
|
const sortedArray = list.sort((a, b) => {
|
||||||
|
const priority = ['date_range', 'date'];
|
||||||
|
|
||||||
|
// 获取a和b的search_type在优先级数组中的索引
|
||||||
|
const aPriority = priority.indexOf(a.search_type);
|
||||||
|
const bPriority = priority.indexOf(b.search_type);
|
||||||
|
|
||||||
|
// 如果a在优先级数组中而b不在,a排在前面
|
||||||
|
if (aPriority !== -1 && bPriority === -1) return -1;
|
||||||
|
// 如果b在优先级数组中而a不在,b排在前面
|
||||||
|
if (bPriority !== -1 && aPriority === -1) return 1;
|
||||||
|
// 如果都在优先级数组中,按优先级数组中的顺序排序
|
||||||
|
if (aPriority !== -1 && bPriority !== -1) return aPriority - bPriority;
|
||||||
|
// 如果都不在优先级数组中,保持原顺序
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return sortedArray;
|
||||||
|
},
|
||||||
|
|
||||||
groupByType(list){
|
groupByType(list){
|
||||||
const grouped = {};
|
const grouped = {};
|
||||||
|
|||||||
@ -299,6 +299,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.finance.cost.export.post(this.params);
|
const res = await this.$API.finance.cost.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -247,6 +247,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.finance.cost.summaryExport.post(this.reqParams);
|
const res = await this.$API.finance.cost.summaryExport.post(this.reqParams);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -377,6 +377,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.early.earlyWarn.export.post(this.params);
|
const res = await this.$API.early.earlyWarn.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -176,6 +176,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -289,6 +289,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.sock.export.post(this.params);
|
const res = await this.$API.orders.order.sock.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -265,6 +265,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -439,6 +439,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -276,6 +276,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.setup.bom.export.post(this.params);
|
const res = await this.$API.setup.bom.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -371,6 +371,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.company.export.post(this.params);
|
const res = await this.$API.system.company.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -189,13 +189,14 @@ export default {
|
|||||||
// 下载导出
|
// 下载导出
|
||||||
exportChangeShow(params){
|
exportChangeShow(params){
|
||||||
if(params.type == 8){
|
if(params.type == 8){
|
||||||
this.exportShow = params.status==0?true:false
|
this.exportShow = params.status==0?true:false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async exportData() {
|
async exportData() {
|
||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.log.export.post(this.params);
|
const res = await this.$API.system.log.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -70,6 +70,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.log.commandExport.post(this.params);
|
const res = await this.$API.system.log.commandExport.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -316,6 +316,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.spareInfo.export.post(this.params);
|
const res = await this.$API.system.spareInfo.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -320,6 +320,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.spare.export.post(this.params);
|
const res = await this.$API.system.spare.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -438,6 +438,7 @@
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.system.user.export.post();
|
const res = await this.$API.system.user.export.post();
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -265,6 +265,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -182,6 +182,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.shipment.out.bomExport.post(this.params);
|
const res = await this.$API.shipment.out.bomExport.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -276,6 +276,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.shipment.out.stockExport.post(this.params);
|
const res = await this.$API.shipment.out.stockExport.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -265,6 +265,7 @@ export default {
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
const res = await this.$API.orders.order.maintenance.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -200,6 +200,7 @@
|
|||||||
if(this.exportShow) return
|
if(this.exportShow) return
|
||||||
const res = await this.$API.user.export.post(this.params);
|
const res = await this.$API.user.export.post(this.params);
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.exportShow = true;
|
||||||
this.$message.success('开始导出');
|
this.$message.success('开始导出');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user