From 26d0d27df94129f202a8123010b57a4b33a7a9fb Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期一, 11 八月 2025 14:57:15 +0800
Subject: [PATCH] 1
---
src/views/flowmgr/programexport.vue | 90 +++++++++++++++++++++++++++++++++-----------
1 files changed, 67 insertions(+), 23 deletions(-)
diff --git a/src/views/flowmgr/programexport.vue b/src/views/flowmgr/programexport.vue
index c8743a5..0a20af5 100644
--- a/src/views/flowmgr/programexport.vue
+++ b/src/views/flowmgr/programexport.vue
@@ -1,36 +1,57 @@
<!--
* @Date: 2025-06-20 20:48:17
- * @LastEditors: gaoshp
- * @LastEditTime: 2025-07-07 22:27:50
+ * @LastEditors: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @LastEditTime: 2025-08-11 14:55:07
* @FilePath: /mdmweb/src/views/flowmgr/programexport.vue
-->
<template>
<basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
- @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset">
- <template #menu-left>
- <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
- <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
- <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
- </template>
- <template #menu="scope">
- <!-- <el-button type="primary" text size="default"
- @click.stop="handleAction(scope.row, scope.index)">澶勭悊鎰忚
- </el-button> -->
- </template>
- </avue-crud>
+ <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="tabsClick">
+ <el-tab-pane label="寰呭姙" name="todo">
+ <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
+ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
+ <template #menu-left>
+ <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
+ <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
+ <el-button type="primary" plain @click="exportExcel">瀵煎嚭</el-button>
+ </template>
+ <template #menu="scope">
+ <!-- <el-button type="primary" text size="default"
+ @click.stop="handleAction(scope.row, scope.index)">澶勭悊鎰忚
+ </el-button> -->
+ </template>
+ </avue-crud>
+ </el-tab-pane>
+ <el-tab-pane label="宸插姙" name="completed">
+ <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
+ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
+ <template #menu-left>
+ <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
+ <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
+ <el-button type="primary" plain @click="exportExcel">瀵煎嚭</el-button>
+ </template>
+ <template #menu="scope">
+ <!-- <el-button type="primary" text size="default"
+ @click.stop="handleAction(scope.row, scope.index)">澶勭悊鎰忚
+ </el-button> -->
+ </template>
+ </avue-crud>
+ </el-tab-pane>
+ </el-tabs>
</basic-container>
</template>
<script>
import { getList } from '@/api/flowmgr/programexport.js';
import NProgress from 'nprogress';
- import { exportBlob } from '@/api/common';
+ import { exportBlobPost } from '@/api/common';
import { getToken } from '@/utils/auth';
+ import { downloadFile } from '@/utils/util';
export default {
name: 'programexport',
data() {
return {
+ activeName: "todo",
// Define your data properties here
page: {
pageSize: 10,
@@ -41,6 +62,7 @@
query: {},
loading: true,
data: [],
+ selection: [],
option: {
addBtn: false,
editBtn: false,
@@ -61,13 +83,17 @@
menu: false,
dialogClickModal: false,
column: [
+ {
+ label: '娴佺▼鏍囬',
+ prop: 'title',
+ },
{
label: '鍥惧彿',
- prop: 'partNo',
+ prop: 'drawingNo',
},
{
label: '鍥惧彿鐗堟',
- prop: 'partNoEdition',
+ prop: 'drawingNoEdition',
},
{
label: '宸ュ簭鍚嶇О',
@@ -83,7 +109,7 @@
prop: 'createTime',
},
{
- label: '瀹屾垚鏃堕棿',
+ label: '閫氳繃鏃堕棿',
prop: 'passTime',
search: true,
hide: true,
@@ -98,6 +124,14 @@
};
},
methods: {
+ tabsClick(tab,event) {
+ console.log(this.activeName,'activeName')
+ console.log(tab,event);
+ this.onLoad(this.page, this.query);
+ },
+ selectionChange(list) {
+ this.selection = list;
+ },
// Define your methods here
currentChange(currentPage) {
this.page.currentPage = currentPage;
@@ -133,12 +167,13 @@
/** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
*/
onLoad(page, params = {}) {
- console.log('onLoad', page, params);
const query = {
...this.query,
// category: params.category ? flowCategory(params.category) : null,
mode: this.mode,
};
+ var status = this.activeName == 'todo'?null:2;
+ params.status = status;
try {
delete query.confirmTime; // 鍒犻櫎涓嶅繀瑕佺殑鏌ヨ鏉′欢
} catch (error) {
@@ -165,11 +200,20 @@
cancelButtonText: '鍙栨秷',
type: 'warning',
}).then(() => {
+ console.log(this.selection)
+ if(this.selection == null || this.selection.length == 0){
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉″鍑�');
+ return;
+ }
NProgress.start();
- exportBlob(
- `/blade-mdm/program/exchange/export-dnc?${this.website.tokenHeader}=${getToken()}`
+ exportBlobPost(
+ `/blade-mdm/program/exchange/export-dnc`,
+ {},
+ {ids: this.selection.map(item => item.id)},
).then(res => {
- downloadXls(res.data, `瀵煎嚭鏈哄簥鍥炰紶绋嬪簭${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ console.log(res.headers['content-disposition'].split('filename=')[1]);
+ downloadFile(res.data, `${name}`);
NProgress.done();
});
});
--
Gitblit v1.9.3