From 76aee3bfa5a1e703fde16408d92b71c4fe2cdeb8 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 08 九月 2025 20:28:22 +0800
Subject: [PATCH] 增加过程卡号显示
---
src/views/flow/donelist.vue | 98 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 71 insertions(+), 27 deletions(-)
diff --git a/src/views/flow/donelist.vue b/src/views/flow/donelist.vue
index bb33dea..2cd3bb5 100644
--- a/src/views/flow/donelist.vue
+++ b/src/views/flow/donelist.vue
@@ -11,7 +11,8 @@
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" >
<template #menu="scope">
<el-button type="primary" text size="default" @click.stop="handleView(scope.row, scope.index)">鏌ョ湅</el-button>
- <el-button type="primary" :disabled="scope.row.processIsFinished==='true'" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">鎾ゅ洖</el-button>
+ <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || (scope.row.currentTaskKeys.toLowerCase().indexOf('program')==-1 && scope.row.currentTaskKeys.toLowerCase().indexOf('useable')==-1)" v-if="permission.takeback_button" text size="default" @click.stop="handleTakeBack(scope.row, scope.index)">鍙栧洖</el-button>
+ <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || scope.row.currentTaskKeys.toLowerCase().indexOf('program')>-1" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">鎾ゅ洖</el-button>
</template>
</avue-crud>
@@ -28,12 +29,13 @@
</basic-container>
</template>
<script>
-import { getDoneList} from '@/api/flow/todolist';
+import { getDoneList,todoChangeNotify} from '@/api/flow/todolist';
import { mapGetters } from 'vuex';
export default {
data() {
return {
tableData: [],
+ query:{},
viewFormOption: {
emptyBtn: false,
submitBtn: false,
@@ -71,7 +73,7 @@
}
},
{
- label: '宸ヨ壓鐗堟',
+ label: '鎵规鍙�',
prop: 'variables.craftEdition',
render: ({ row }) => {
return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
@@ -114,9 +116,9 @@
},
{
label: '杩囩▼鍗″彿',
- prop: 'empty',
+ prop: '',
render: ({ row }) => {
- return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+ return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
}
},
{
@@ -205,16 +207,26 @@
search: true,
searchType: 'input',
hide: true,
+ },
+ {
+ label: '鐘舵��',
+ prop: 'status',
+ //cleerable:true,
+ search: true,
+ type: 'select',
dicData: [
{
- label: '娑夊瘑缃戠▼搴�',
- value: 1,
+ label:'杩涜涓�',
+ value:'1'
},
{
- label: '宸ユ帶缃戣溅搴婄▼搴�',
- value: 2,
+ label:'宸茬粨鏉�',
+ value:'2'
},
],
+ labelKey: 'label',
+
+ span: "8"
},
{
label: '鏍囬',
@@ -292,6 +304,7 @@
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ sortable:true,
search: false,
searchRange: true,
searchSpan: 8,
@@ -332,6 +345,38 @@
});
this.dialogVisible = true;
},
+ handleTakeBack(row){
+ //缁勯暱鍙栧洖
+ this.$confirm('纭瑕佸彇鍥炲悧锛�', '', {
+ confirmButtonText: this.$t('submitText'),
+ cancelButtonText: this.$t('cancelText'),
+ type: 'warning',
+ }).then(() => {
+ axios({
+ url: '/blade-mdm/flow/mgr/takeback',
+ method: 'get',
+ params: {processInstanceId: row.processInstanceId}
+ }).then(res => {
+ if(res.data.code !== 200) {
+ this.$message.error(res.data.msg);
+ return;
+ }
+ this.$message.success('鎿嶄綔鎴愬姛');
+
+ todoChangeNotify();
+
+ this.refreshChange();
+ }).catch(err => {
+ console.error(err);
+ //done()
+ });
+
+ }).catch(() => {
+ console.log('>>>>>>')
+ // this.$message.info('宸插彇娑堟搷浣�');
+ //done();
+ });
+ },
handleWithdraw(row) {
//console.log(row,row.processInstanceId)
this.$confirm('纭瑕佹挙鍥炲悧锛�', '', {
@@ -349,15 +394,19 @@
return;
}
this.$message.success('鎿嶄綔鎴愬姛');
+
+ todoChangeNotify();
+
+ this.refreshChange();
}).catch(err => {
console.error(err);
- done()
+ //done()
});
}).catch(() => {
console.log('>>>>>>')
// this.$message.info('宸插彇娑堟搷浣�');
- done();
+ //done();
});
},
currentChange(currentPage) {
@@ -370,34 +419,29 @@
console.log('searchChange', params);
params.createTimeBegin = params?.processCreateTime?.[0] || '';
params.createTimeEnd = params?.processCreateTime?.[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 = {
createTimeBegin: params.createTimeBegin,
createTimeEnd: params.createTimeEnd,
- keyword: params.keyword || ''
+ keyword: params.keyword || '',
+ status: params.status || 0
}
this.query = data
this.onLoad(this.page, data);
done();
},
searchReset () {
- this.loading = true;
this.form = {};
- this.getList();
+ this.getDoneList();
},
sizeChange() {
- this.loading = true;
- this.getList();
+
+ this.getDoneList();
},
refreshChange() {
this.onLoad(this.page, this.query);
},
- onLoad(page, params = {}) {
+ onLoad(page, params = {},done) {
const query = {
...this.query,
// category: params.category ? flowCategory(params.category) : null,
@@ -408,17 +452,17 @@
console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
}
- this.loading = true;
+ //this.loading = true;
getDoneList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
+ if(done){
+ done();
+ }
});
},
- at1(){
- console.log('computed')
- }
},
computed: {
--
Gitblit v1.9.3