From b311b3cfee0a4635c236eea6c5870d805a29a160 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 22 九月 2025 13:09:31 +0800
Subject: [PATCH] 优化导出工控网
---
src/views/tasks/machinereturnfileop.vue | 63 +++++++++++++++++++------------
1 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/src/views/tasks/machinereturnfileop.vue b/src/views/tasks/machinereturnfileop.vue
index 6be9474..21510c5 100644
--- a/src/views/tasks/machinereturnfileop.vue
+++ b/src/views/tasks/machinereturnfileop.vue
@@ -6,16 +6,16 @@
-->
<template>
<basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
+ <avue-crud :option="option" :search="query" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
@search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
<template #menu-left>
- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button>
+ <el-button type="primary" :disabled="this.selectedList.length==0" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button>
<!--<el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button>-->
- <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
+ <el-button type="primary" :disabled="this.selectedList.length==0" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
</template>
<template #menu="scope">
- <el-button type="primary" text size="default" v-if="permission.flow_model_update"
+ <el-button type="primary" text size="default"
@click.stop="handleAction(scope.row, scope.index)">瀹℃壒
</el-button>
</template>
@@ -40,7 +40,7 @@
total: 0,
},
form: {},
- query: {},
+ query: {status:1},
loading: true,
data: [],
option: {
@@ -49,15 +49,12 @@
delBtn: false,
columnBtn: false,
tip: false,
- // simplePage: true,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: '60%',
- // tree: true,
border: true,
index: true,
selection: true,
- // viewBtn: true,
menuWidth: 100,
menu: false,
dialogClickModal: false,
@@ -65,7 +62,26 @@
{
label: '鏂囦欢鍚嶇О',
- prop: 'name'
+ prop: 'name',
+ search:true,
+ searchSpan:4
+ },
+ {
+ label: '瀵煎嚭鐘舵��',
+ prop: 'status',
+ search:true,
+ type:'select',
+ searchSpan:4,
+ dicData:[
+ {
+ label: '鏈鍑�',
+ value:1
+ },
+ {
+ label: '宸插鍑�',
+ value:2
+ }
+ ]
},
{
label: '鍥炰紶鏈哄簥',
@@ -101,25 +117,25 @@
},
{
label: '纭鏃堕棿',
- prop: 'determineTime',
+ prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
search: true,
searchRange: true,
- searchSpan: 8,
+ searchSpan: 10,
hide: false,
- }/*,
- {
- label: '鎺ユ敹x鏃堕棿',
- prop: 'determineTime',
+ },
+ {
+ label: '瀵煎嚭鏃堕棿',
+ prop: 'exportTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
- }*/
+ }
],
- selectedList: [],
- }
+ },
+ selectedList: [],
}
},
methods: {
@@ -144,6 +160,7 @@
}
).then(res => {
downloadXls(res.data, `宸ユ帶缃戝洖浼犵▼搴�${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.zip`);
+ this.onLoad(this.page, {});
NProgress.done();
});
});
@@ -174,15 +191,12 @@
console.log('searchChange', params);
params.confirmTimeBegin = params?.determineTime?.[0] || '';
params.confirmTimeEnd = params?.determineTime?.[1] || '';
- console.log(params);
- // data = {
- // createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '',
- // createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '',
- // keyword: params.keyword || ''
- // }
+
data = {
confirmTimeBegin: params.confirmTimeBegin,
confirmTimeEnd: params.confirmTimeEnd,
+ name: params.name,
+ status: this.query.status,
}
this.query = data
this.onLoad(this.page, data);
@@ -216,7 +230,6 @@
console.log('onLoad', page, params);
const query = {
...this.query,
- // category: params.category ? flowCategory(params.category) : null,
mode: this.mode,
};
try {
--
Gitblit v1.9.3