From 217bffa9704f2938391977605dcaae1a8baae86f Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 10 九月 2025 16:00:41 +0800
Subject: [PATCH] 修改首页搜索错误
---
src/views/flowmgr/programexport.vue | 39 ++++++++++++++++++++++++++++++++-------
1 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/src/views/flowmgr/programexport.vue b/src/views/flowmgr/programexport.vue
index 47cb60d..c5ba897 100644
--- a/src/views/flowmgr/programexport.vue
+++ b/src/views/flowmgr/programexport.vue
@@ -13,7 +13,7 @@
<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>
+ <el-button type="primary" :disabled="this.selection.length==0" plain @click="exportExcel">瀵煎嚭</el-button>
</template>
<template #menu="scope">
<!-- <el-button type="primary" text size="default"
@@ -28,7 +28,7 @@
<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>
+ <el-button type="primary" :disabled="this.selection.length==0" plain @click="exportExcel">瀵煎嚭</el-button>
</template>
<template #menu="scope">
<!-- <el-button type="primary" text size="default"
@@ -46,6 +46,7 @@
import NProgress from 'nprogress';
import { exportBlobPost } from '@/api/common';
import { getToken } from '@/utils/auth';
+ import {todoChangeNotify} from '@/api/flow/todolist';
import { downloadFile } from '@/utils/util';
export default {
name: 'programexport',
@@ -73,6 +74,7 @@
// simplePage: true,
searchShow: true,
searchMenuSpan: 6,
+ searchEnter:true,
dialogWidth: '60%',
// tree: true,
border: true,
@@ -109,7 +111,7 @@
with: 85
},
{
- label: '鍥惧彿鐗堟',
+ label: '鍥剧焊鐗堟',
prop: 'drawingNoEdition',
with: 85
},
@@ -146,6 +148,7 @@
tip: false,
// simplePage: true,
searchShow: true,
+ searchEnter:true,
searchMenuSpan: 6,
dialogWidth: '60%',
// tree: true,
@@ -182,7 +185,7 @@
width: 85
},
{
- label: '鍥惧彿鐗堟',
+ label: '鍥剧焊鐗堟',
prop: 'drawingNoEdition',
width: 85
},
@@ -292,13 +295,36 @@
this.loading = false;
});
},
+ findDuplicates(arr) {
+ const seen = new Set();
+ const duplicates = new Set();
+
+ arr.forEach(item => {
+ if (seen.has(item)) {
+ duplicates.add(item);
+ } else {
+ seen.add(item);
+ }
+ });
+
+ return Array.from(duplicates);
+ },
exportExcel() {
this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning',
}).then(() => {
- console.log(this.selection)
+ //console.log(this.selection)
+ let selectArray = [];
+ for(var i=0;i<this.selection.length;i++){
+ selectArray.push(this.selection[i].name+"-"+this.selection[i].processEdition)
+ }
+ let dupData = this.findDuplicates(selectArray);
+ if(dupData.length > 0){
+ this.$message.error('涓嶈兘鍦ㄤ竴娆″鍑轰腑閫夋嫨涓�涓▼搴忕殑涓嶅悓鐗堟湰:['+dupData.join()+"]");
+ return;
+ }
if(this.selection == null || this.selection.length == 0){
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉″鍑�');
return;
@@ -311,8 +337,6 @@
).then(res => {
console.log('status='+res.status)
if(res.status == 200){
- //console.log(res.data);
-
let name = res.headers['content-disposition'].split('filename=')[1]
name = decodeURI(name)
//console.log(res.headers['content-disposition'].split('filename=')[1]);
@@ -322,6 +346,7 @@
this.$message.error('瀵煎嚭閿欒');
console.log(res);
}
+ todoChangeNotify();
NProgress.done();
this.onLoad(this.page, this.query);
});
--
Gitblit v1.9.3