From 3ded1213a0b156fb04f2ffff47e2dc32104e8bb9 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 05 九月 2025 01:13:01 +0800
Subject: [PATCH] 任务提醒,增加导出提醒;
---
src/views/flowmgr/backImport2.vue | 85 +++++++++++++++++++++++++++++-------------
1 files changed, 58 insertions(+), 27 deletions(-)
diff --git a/src/views/flowmgr/backImport2.vue b/src/views/flowmgr/backImport2.vue
index 712b819..7270c63 100644
--- a/src/views/flowmgr/backImport2.vue
+++ b/src/views/flowmgr/backImport2.vue
@@ -1,20 +1,19 @@
<template>
<basic-container>
<avue-crud :addBtn="false" :option="option" :table-loading="loading" :data="data" ref="crud"
- @current-change="currentChange" @search-change="searchChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ @current-change="currentChange" v-model:page="page" @search-change="searchChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<template #menu-left>
<!-- <div style="display: flex;">
<el-button type="primary" size="default" icon="el-icon-circle-plus" @click="importData">瀵煎叆</el-button>
- <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleWarehouse"
- style="margin-left: 12px;">鍏ュ簱</el-button>
</div> -->
</template>
<template #menu="scope">
- <!-- <el-button type="primary" text size="default" @click.stop="fileView(scope.row, scope.index)">鏌ョ湅鏂囦欢</el-button> -->
+ <el-button type="primary" :disabled="scope.row.processExecuted==true" text size="default" @click.stop="cancelProcess(scope.row, scope.index)">鎾ら攢</el-button>
+ <el-button type="primary" text size="default" @click.stop="hisFileView(scope.row, scope.index)">鏌ョ湅鏂囦欢</el-button>
</template>
</avue-crud>
- <el-dialog title="鏂囦欢鍚嶇О" append-to-body v-model="fileViewModel">
- <el-table :data="tableData" border @row-click="showContent" max-height="200" highlight-current-row>
+ <el-dialog title="鏌ョ湅鏂囦欢" append-to-body v-model="fileViewModel">
+ <el-table ref="hisFilesTable" :data="tableData" border @row-click="showHisContent" max-height="200" highlight-current-row>
<el-table-column type="index" label="#" width="40" align="center" />
<el-table-column prop="name" label="绋嬪簭鍚嶇О"></el-table-column>
</el-table>
@@ -26,8 +25,9 @@
<script>
import {
- getList,
+ getList,hisFileList
} from '@/api/flowmgr/backImport';
+import { getRowIdentity } from 'element-plus/es/components/table/src/util';
export default {
data() {
return {
@@ -35,6 +35,7 @@
tableData: [],
fileViewModel: false,
selection: [],
+ selectedId:0,//鏌ョ湅鏂囦欢鐢紝褰撳墠閫夊畾琛岀殑id
excelBox: false,
loading: false,
query:{},
@@ -45,8 +46,9 @@
labelWidth: 120,
emptyBtn: false,
searchShow: true,
+ searchEnter:true,
searchSpan: 8,
- menu: false,
+ menu: true,
// selection: true,
column: [
{
@@ -141,17 +143,6 @@
/** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
*/
onLoad(page, params = {}) {
- console.log('onLoad', page, params);
- /*
- const data = {
- ...this.query,
- createTimeBegin: params.createTimeBegin,
- createTimeEnd: params.createTimeEnd,
- keyword: params.keyword || '',
- myProcessName: params.myProcessName || ''
- };*/
- params.createTimeBegin = params?.createTime?.[0] || '';
- params.createTimeEnd = params?.createTime?.[1] || '';
const data = {
...this.query,
createTimeBegin: params.createTimeBegin,
@@ -161,11 +152,13 @@
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
const data = res.data.data
+
this.page.total = data.total;
+
this.data = data.records.map(v => {
return {
...v,
- id: v.processInstanceId,
+ //id: v.processInstanceId,
}
});
this.loading = false;
@@ -178,12 +171,12 @@
this.loading = false;
});
},
- showContent(row, column, event) {
- console.log(row, 111)
+ showHisContent(row) {
+ //console.log(row)
axios({
- url: '/blade-mdm/program/dncsendback/back-file-content',
+ url: '/blade-mdm/program/dncsendback/history-file-content',
method: 'get',
- params: { entryName: row.entryName }
+ params: {id: this.selectedId, entryName: row.entryName }
}).then(
res => {
console.log(res)
@@ -194,9 +187,46 @@
}
});
},
- fileView(row) {
- this.tableData = row.files;
- this.fileViewModel = true;
+ hisFileView(row) {
+ this.appContent='';//娓呯┖鍐呭
+ this.selectedId = row.id;
+ //this.tableData = [{name:'ttt','entryName':'entry1'}];
+ hisFileList({id: row.id}).then(res => {
+ this.tableData = res.data.data
+ this.loading = false;
+ if(this.tableData.length > 0){
+ this.showHisContent(this.tableData[0])
+ this.$refs.hisFilesTable.setCurrentRow(this.tableData[0]); // 璁剧疆绗竴琛岄珮浜�
+ }
+ }, () => {
+ this.tableData = [];
+ this.loading = false;
+ }).catch(err => {
+ console.log(err)
+ this.tableData = [];
+ this.loading = false;
+ });
+
+ this.fileViewModel = true;
+ },
+ cancelProcess(row) {
+ //鍙栨秷娴佺▼
+ this.$confirm('鏄惁鍙栨秷娴佺▼锛�', '', {
+ confirmButtonText: this.$t('submitText'),
+ cancelButtonText: this.$t('cancelText'),
+ type: 'warning',
+ }).then(() => {
+ axios({
+ url: '/blade-mdm/program/dncsendback/cancel-process',
+ method: 'post',
+ params: { id: row.id }
+ }).then(
+ res => {
+ this.onLoad(this.page, this.query);
+ });
+ }).catch(()=>{
+ console.log('cancel')
+ })
},
selectionChange(selection) {
this.selection = selection;
@@ -248,6 +278,7 @@
}
},
};
+
</script>
<style lang="scss">
--
Gitblit v1.9.3