From 2fa8e30d497803c4af428f7b65b77fa26b0ca924 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 05 九月 2025 23:19:41 +0800
Subject: [PATCH] 增加审批表打印
---
src/views/statreport/confirmTablePrint.vue | 708 +++++++++++++++++++++++++++++++++++++++++
src/views/statreport/tablePrint.vue | 43 ++
src/views/flowmgr/exceptiontask.vue | 2
src/views/statreport/approveTablePrint.vue | 223 +++++++++++++
src/api/statreport/approvetable.js | 18 +
src/views/flowmgr/taskassign.vue | 4
6 files changed, 995 insertions(+), 3 deletions(-)
diff --git a/src/api/statreport/approvetable.js b/src/api/statreport/approvetable.js
new file mode 100644
index 0000000..d9c0c74
--- /dev/null
+++ b/src/api/statreport/approvetable.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2025-08-24 22:38:05
+ * @LastEditors: yangys
+ * @LastEditTime: 2025-08-24 08:32:12
+ * @FilePath: /mdmweb/src/api/flowmgr/exceptiontask.js
+ */
+import request from '@/axios';
+export const getDispatchTaskList = (current, size, params) => {
+ return request({
+ url: '/blade-mdm/statreport/tableprint/dispatch-page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ },
+ })
+};
\ No newline at end of file
diff --git a/src/views/flowmgr/exceptiontask.vue b/src/views/flowmgr/exceptiontask.vue
index 4232f08..986d9e6 100644
--- a/src/views/flowmgr/exceptiontask.vue
+++ b/src/views/flowmgr/exceptiontask.vue
@@ -2,7 +2,7 @@
* @Date: 2025-06-18 09:17:09
* @LastEditors: yangys
* @LastEditTime: 2025-08-13 21:23:34
- * @FilePath: /mdmweb/src/views/tasks/machinereturnfileop.vue
+ * @FilePath: /mdmweb/src/views/tasks/exceptiontask.vue
-->
<template>
<basic-container>
diff --git a/src/views/flowmgr/taskassign.vue b/src/views/flowmgr/taskassign.vue
index 713fd57..072a436 100644
--- a/src/views/flowmgr/taskassign.vue
+++ b/src/views/flowmgr/taskassign.vue
@@ -149,7 +149,7 @@
{
label: '鎵规鍙�',
prop: 'craftEdition',
- placeholder:'濡�"A"',
+ placeholder:'濡�"2S24001"',
type: 'input',
span: 12,
dataType: 'string',
@@ -211,7 +211,7 @@
span: 12,
dataType: 'string',
class:'input_holder_warn',
- placeholder:'闈炲亸绂诲崟浠诲姟璇风暀绌�',
+ placeholder:'鏃犲亸绂诲崟浠诲姟璇风暀绌�',
blur: (col) => {
this.handleTrim(col)
},
diff --git a/src/views/statreport/approveTablePrint.vue b/src/views/statreport/approveTablePrint.vue
new file mode 100644
index 0000000..cdd4c2d
--- /dev/null
+++ b/src/views/statreport/approveTablePrint.vue
@@ -0,0 +1,223 @@
+<!--
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: yangys
+ * @LastEditTime: 2025-08-13 21:23:34
+ * @FilePath: /mdmweb/src/views/tasks/exceptiontask.vue
+-->
+<template>
+ <basic-container>
+ <avue-crud :option="option" :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" :disabled="this.selection.length==0" plain @click="handleDelBatch">鎵归噺鍒犻櫎</el-button>
+ -->
+ </template>
+ <template #menu="scope">
+ <el-button type="primary" text size="default"
+ @click.stop="handleExport(scope.row, scope.index)">涓嬭浇瀹℃壒琛�
+ </el-button>
+
+ </template>
+
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import { getDispatchTaskList } from '@/api/statreport/approvetable.js';
+import { exportBlob } from '@/api/common';
+import { exportBlobPost } from '@/api/common';
+import { downloadFile } from '@/utils/util';
+import { getToken } from '@/utils/auth';
+import NProgress from 'nprogress';
+import 'nprogress/nprogress.css';
+export default {
+ name: 'MachineReturnFileOp',
+ data() {
+ return {
+ page: {
+ size: 10,
+ current: 1,
+ total: 0,
+ },
+ form: {},
+ query: {},
+ loading: true,
+ data: [],
+ option: {
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ columnBtn: false,
+ tip: false,
+ searchEnter: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: '60%',
+ // tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ // viewBtn: true,
+ menuWidth: 140,
+ menu: true,
+ dialogClickModal: false,
+ column: [
+
+ {
+ label: '闆剁粍浠跺彿',
+ search: true,
+ prop: 'drawingNo'
+ },
+ {
+ label: '宸ュ簭鍙�',
+ width: 70,
+ prop: 'processNo'
+ },
+ {
+ label: '宸ュ簭鐗堟',
+ prop: 'processEdition'
+ },
+ {
+ label: '鍥惧彿鐗堟',
+ prop: 'drawingNoEdition'
+ },
+ {
+ label: '鏈哄簥缂栫爜',
+ prop: 'machineCode',
+ width: 180,
+ },
+ {
+ label: '宸ュ簭鍚嶇О',
+ prop: 'processName',
+ },
+ {
+ label: '鎵规鍙�',
+ width:85,
+ prop: 'craftEdition'
+ },
+ {
+ label: '鍋忕鍗曞彿',
+ prop: 'deviation'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ type: 'datetime',
+ showOverflowTooltip:true,
+ width: 155,
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ search: true,
+ searchRange: true,
+ searchSpan: 8,
+ hide: false,
+ }
+ ],
+ selection: [],
+ },
+
+ selection: [],
+ }
+ },
+ methods: {
+ selectionChange (list) {
+ this.selection = list;
+ },
+
+ handleExport(row,index) {
+ //瀹℃壒琛ㄤ笅杞�
+ this.$confirm('鏄惁瀵煎嚭瀹℃壒琛�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ NProgress.start();
+ exportBlobPost(
+ `/blade-mdm/statreport/tableprint/export-approve-table`,
+ { id:row.id,processInstanceId: row.processInstanceId }
+ ).then(res => {
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ //console.log(res.headers['content-disposition'].split('filename=')[1]);
+ name = decodeURI(name)
+ downloadFile(res.data, `${name}`);
+ NProgress.done();
+ });
+ });
+ },
+
+ searchChange(params, done) {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ console.log('searchChange', params);
+ params.createTimeBegin = params?.createTime?.[0] || '';
+ params.createTimeEnd = params?.createTime?.[1] || '';
+
+ data = {
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ drawingNo: params.drawingNo,
+ }
+ this.query = data
+ this.onLoad(this.page, data);
+ done();
+ },
+ searchReset() {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ data = {
+ createTimeBegin: params.confirmTimeBegin,
+ createTimeEnd: params.confirmTimeEnd,
+ keyword: params.keyword || ''
+ }
+ this.onLoad(this.page, data);
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ // this.onLoad();
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+ */
+ onLoad(page, params = {}) {
+ console.log('onLoad', page, params);
+ const query = {
+ ...this.query,
+ // category: params.category ? flowCategory(params.category) : null,
+ //mode: this.mode,
+ };
+ try {
+ delete query.confirmTime; // 鍒犻櫎涓嶅繀瑕佺殑鏌ヨ鏉′欢
+ } catch (error) {
+ console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
+ }
+
+ this.loading = true;
+ getDispatchTaskList(page.current, page.size, Object.assign(query, params)).then(res => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ }, () => {
+ this.data = [];
+ this.loading = false;
+ }).catch(err => {
+ this.data = [];
+ this.loading = false;
+ });
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped></style>
\ No newline at end of file
diff --git a/src/views/statreport/confirmTablePrint.vue b/src/views/statreport/confirmTablePrint.vue
new file mode 100644
index 0000000..75fa687
--- /dev/null
+++ b/src/views/statreport/confirmTablePrint.vue
@@ -0,0 +1,708 @@
+<!--
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-08-17 08:46:49
+ * @FilePath: /mdmweb/src/views/flowmgr/processQuery2.vue
+-->
+<template>
+ <basic-container>
+ <avue-crud :option="option" :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>
+
+ </template>
+ <template #menu="scope">
+ <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
+ </el-button>
+ <!--
+ <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'"
+ @click.stop="handleApproveTable(scope.row, scope.index)">瀹℃壒琛�
+ </el-button>
+ <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'program-cure'"
+ @click.stop="handleConfirmTable(scope.row, scope.index)">纭琛�
+ </el-button>
+ -->
+ </template>
+ </avue-crud>
+ <el-dialog title="鎸囨淳" append-to-body v-model="reassignBox" width="30%">
+ <avue-form ref="reassginform" :option="reassignOption" v-model="reassignForm"
+ @submit="toPerson"></avue-form>
+ </el-dialog>
+
+ <el-dialog title="鏌ョ湅璇︽儏" v-model="dialogVisible" width="60%">
+ <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form>
+ <el-table :data="tableData" style="width: 100%">
+ <el-table-column prop="assigneeName" label="鎵ц浜�" />
+ <el-table-column prop="taskName" label="浠诲姟鍚嶇О" />
+ <el-table-column prop="comment" label="鎵规敞" />
+ <el-table-column prop="createTime" label="寮�濮嬫椂闂�" />
+ <el-table-column prop="endTime" label="瀹屾垚鏃堕棿" />
+ </el-table>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { getList2, deleteRow, printRow } from '@/api/flowmgr/processQuery.js';
+import { getAssignee, reassgin } from '@/api/flow/todolist';
+import { exportBlobPost } from '@/api/common';
+import NProgress from 'nprogress';
+import { downloadFile } from '@/utils/util';
+import 'nprogress/nprogress.css';
+
+export default {
+ name: 'MachineReturnFileOp',
+ data() {
+ return {
+ tableData: [],
+ viewRow: {},
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ form: {},
+ query: {},
+ loading: true,
+ data: [],
+ option: {
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ viewBtn: false,
+ columnBtn: false,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 7,
+ searchEnter:true,
+ dialogWidth: '70%',
+ // tree: true,
+ border: true,
+ index: true,
+ selection: false,
+ menuWidth: 80,
+ // menu: false,
+ labelWidth: 90,
+ menuSpan: 6,
+ dialogClickModal: false,
+ column: [
+ {
+ label: '娴佺▼鍚嶇О',
+ prop: 'myProcessName',
+ search: true,
+ searchType: 'select',
+ hide: true,
+ dicUrl: `/blade-system/dict-biz/dictionary?code=process_name`,
+ props: {
+ label: 'dictValue',
+ value: 'dictValue',
+ },
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ type: 'datetime',
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ search: true,
+ searchRange: true,
+ hide: true,
+ },
+ {
+ label: '鍏抽敭瀛�',
+ prop: 'keyword',
+ search: true,
+ searchType: 'input',
+ hide: true,
+ viewDisplay: false,
+ },
+ {
+ label: '鏍囬',
+ prop: 'variables.title',
+ width: 150,
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.title)
+ },
+ renderForm: ({ row }) => {
+ return h('span', {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.title || '');
+ }
+ },
+ {
+ label: '娴佺▼鍚嶇О',
+ prop: '',
+ width: 80,
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.myProcessName)
+ }
+ },
+ {
+ label: '鎵规鍙�',
+ prop: 'variables.craftEdition',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.craftEdition || '');
+ }
+ },
+ {
+ label: '宸ュ簭鍙�',
+ prop: 'processNo',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.processNo || '');
+ }
+ },
+ {
+ label: '宸ュ簭鍚嶇О',
+ prop: 'processName',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.processName || '');
+ }
+ },
+ {
+ label: '宸ュ簭鐗堟',
+ prop: 'processEdition',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.processEdition || '');
+ }
+ },
+ {
+ label: '闆剁粍浠跺彿',
+ prop: 'drawingNo',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.drawingNo || '');
+ }
+ },
+ {
+ label: '浠诲姟杞﹂棿',
+ prop: 'workshop',
+ width: 80,
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+ }
+ },
+ {
+ label: '杩囩▼鍗″彿',
+ prop: 'empty',
+ width: 80,
+ },
+ {
+ label: '鍥惧彿',
+ prop: '',
+ width: 100,
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.drawingNo)
+ },
+ renderForm: ({ row }) => {
+ return h('span', {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.drawingNo || '');
+ }
+ },
+ {
+ label: '浜у搧鍨嬪彿',
+ prop: '',
+ width: 100,
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.productModel)
+ },
+ renderForm: ({ row }) => {
+ return h('span', {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.productModel || '');
+ }
+ },
+
+ {
+ label: '鏈哄簥',
+ prop: '',
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.machineCode)
+ },
+ renderForm: ({ row }) => {
+ return h('span', {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.machineCode || '');
+ }
+ },
+ {
+ label: '鍒涘缓浜�',
+ prop: 'startUserName',
+ width: 80,
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'processCreateTime',
+ },
+ {
+ label: '褰撳墠鑺傜偣',
+ prop: 'taskName',
+ width: 90
+ },
+ {
+ label: '璁″垝鍔犲伐鏃堕棿',
+ prop: 'planStartTime',
+ width: 180,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.planStartTime || '');
+ }
+ },
+ {
+ label: '绋嬪簭鍖呭悕',
+ prop: 'programPackageName',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.programPackageName || '');
+ }
+ },
+ ],
+ },
+ viewFormOption: {
+ emptyBtn: false,
+ submitBtn: false,
+ menuBtn: false,
+ labelWidth: 100,
+ span: 8,
+ column: [
+ {
+ label: '娴佺▼鍚嶇О',
+ prop: '',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
+ }
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.createTime)
+ },
+ },
+ {
+ label: '鏍囬',
+ prop: 'variables.title',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.title)
+ }
+ },
+
+ {
+ label: '鎵规鍙�',
+ prop: 'variables.craftEdition',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
+ }
+ },
+ {
+ label: '宸ュ簭鍙�',
+ prop: 'processNo',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.processNo || '');
+ }
+ },
+ {
+ label: '宸ュ簭鍚嶇О',
+ prop: 'processName',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.processName || '');
+ }
+ },
+ {
+ label: '宸ュ簭鐗堟',
+ prop: 'processEdition',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.processEdition || '');
+ }
+ },
+ {
+ label: '闆剁粍浠跺彿',
+ prop: 'drawingNo',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.drawingNo || '');
+ }
+ },
+ {
+ label: '浠诲姟杞﹂棿',
+ prop: 'workshop',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+ }
+ },
+ {
+ label: '杩囩▼鍗″彿',
+ prop: 'empty',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+ }
+ },
+ {
+ label: '鍥惧彿',
+ prop: 'drawingNo',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.drawingNo)
+ }
+ },
+ {
+ label: '浜у搧鍨嬪彿',
+ prop: 'productModel',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.productModel)
+ }
+ },
+ {
+ label: '鏈哄簥',
+ prop: 'machineCode',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.machineCode)
+ }
+ },
+ {
+ label: '鍒涘缓浜�',
+ prop: 'startUserName',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.startUserName)
+ }
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'processCreateTime',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.processCreateTime)
+ }
+ },
+ {
+ label: '褰撳墠鑺傜偣',
+ prop: 'taskName',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.taskName)
+ }
+ },
+ {
+ label: '璁″垝鍔犲伐鏃堕棿',
+ prop: 'planStartTime',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.planStartTime || '');
+ }
+ },
+ {
+ label: '绋嬪簭鍖呭悕',
+ prop: 'programPackageName',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.programPackageName || '');
+ }
+ },
+ {
+ label: '鍋忕鍗曞彿',
+ prop: '',
+ render: ({ row }) => {
+ return h('p',{'class': 'margin0'}, row?.variables?.deviation || '');
+ }
+ },
+ ],
+ },
+ selectedList: [],
+ dialogVisible: false,
+ reassignBox: false,
+ reassignForm: {},
+ reassignOption: {
+ submitBtn: true,
+ emptyBtn: false,
+ column: [
+ {
+ label: '鍙戦�佺粰',
+ prop: 'newAssigneeId',
+ type: 'select',
+ // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
+ // dicFlag: true,
+ props: {
+ label: 'name',
+ value: 'id',
+ },
+ span: 24,
+ disabled: false,
+ dicData: [
+
+ ],
+ rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
+ },
+ {
+ label: '澶囨敞',
+ span: 24,
+ prop: 'comment',
+ type: 'textarea',
+ rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+ },
+ ],
+ },
+ }
+ },
+ mounted() {
+ getAssignee().then(res => {
+ this.reassignOption.column[0].dicData = res.data.data;
+ })
+ },
+ methods: {
+ customView(row) {
+ this.viewRow = {...row};
+ axios({
+ url: '/blade-mdm/flow/mgr/process-trace',
+ method: 'get',
+ params: {processInstanceId: row.processInstanceId}
+ }).then(
+ res => {
+ this.tableData = res.data.data;
+ });
+ this.dialogVisible = true;
+ },
+ reassign() {// 閲嶆柊鎸囨淳
+ console.log(this.selectedList.length)
+ if (this.selectedList.length === 0) {
+ this.$message.warning('璇烽�夋嫨闇�瑕侀噸鏂版寚娲剧殑浠诲姟');
+ return;
+ }
+ if (this.selectedList.length > 1) {
+ this.$message.warning('璇烽�夋嫨涓�鏉�');
+ return;
+ }
+ this.reassignBox = true;
+ },
+ toPerson(form, done) {
+ this.$confirm('璇风‘璁ゆ槸鍚︽寚娲�', '', {
+ confirmButtonText: this.$t('submitText'),
+ cancelButtonText: this.$t('cancelText'),
+ type: 'warning',
+ }).then(() => {
+ console.log('toPerson', form);
+ reassgin({
+ ...form,
+ taskId: this.selectedList[0].taskId,
+ processInstanceId: this.selectedList[0].processInstanceId,
+ }).then(res => {
+ this.$message.success('鎸囨淳鎴愬姛');
+ this.reassignBox = false;
+ this.$refs?.reassginform?.resetForm();
+ this.onLoad(this.page, this.query);
+
+ }).catch(err => {
+ console.error(err);
+ })
+ });
+ done();
+ },
+ handleAction(row, index, flag) {
+ if (flag === 0) {
+ // 澶勭悊鎺ュ彈鎴栨嫆缁濇搷浣�
+ let ids = [row.id].toString();
+ this.$confirm('纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ })
+ .then(() => {
+ deleteRow({ processInstanceId: row.processInstanceId,id:row.processInstanceId }).then(res => {
+ this.onLoad(this.page, this.query);
+ })
+ })
+ } else if (flag === 1) {
+
+ this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ console.log(this.selection)
+ NProgress.start();
+ exportBlobPost(
+ `/blade-mdm/flow/mgr/export-approve-table`,
+ { processInstanceId: row.processInstanceId },
+ { processInstanceId: row.processInstanceId },
+ ).then(res => {
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ console.log(res.headers['content-disposition'].split('filename=')[1]);
+ downloadFile(res.data, `瀹℃壒鎵撳嵃-${name}`);
+ NProgress.done();
+ });
+ });
+ }
+
+ },
+ handleApproveTable(row, index,) {
+ //瀹℃壒琛ㄤ笅杞�
+ this.$confirm('鏄惁瀵煎嚭瀹℃壒琛�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ console.log(this.selection)
+ NProgress.start();
+ exportBlobPost(
+ `/blade-mdm/flow/mgr/export-approve-table`,
+ { processInstanceId: row.processInstanceId }
+ ).then(res => {
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ console.log(res.headers['content-disposition'].split('filename=')[1]);
+ name = decodeURI(name)
+ downloadFile(res.data, `${name}`);
+ NProgress.done();
+ });
+ });
+
+
+ },
+ handleConfirmTable(row, index,) {
+ //纭琛ㄤ笅杞�
+ this.$confirm('鏄惁瀵煎嚭纭琛�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ console.log(this.selection)
+ NProgress.start();
+ exportBlobPost(
+ `/blade-mdm/flow/mgr/export-confirm-table`,
+ { processInstanceId: row.processInstanceId }
+ ).then(res => {
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ console.log(res.headers['content-disposition'].split('filename=')[1]);
+ name = decodeURI(name)
+ downloadFile(res.data, `${name}`);
+ NProgress.done();
+ });
+ });
+
+
+ },
+
+ selectionChange(list) {
+ console.log('selectionChange', list);
+ this.selectedList = list;
+ },
+
+ searchChange(params, done) {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ console.log('searchChange', params);
+ params.createTimeBegin = params?.createTime?.[0] || '';
+ params.createTimeEnd = params?.createTime?.[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 || undefined,
+ createTimeEnd: params.createTimeEnd || undefined,
+ keyword: params.keyword || undefined,
+ myProcessName: params.myProcessName || undefined
+ }
+ this.query = data
+ this.onLoad(this.page, data);
+ done();
+ },
+ searchReset() {
+ let data = {}
+ this.query = data;
+ this.page.currentPage = 1;
+ data = {
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || '',
+ myProcessName: params.myProcessName || ''
+ }
+ this.onLoad(this.page, data);
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ // this.onLoad();
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+ */
+ onLoad(page, params = {}) {
+ console.log('onLoad', page, params);
+ const data = {
+ ...this.query,
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || '',
+ myProcessName: params.myProcessName || ''
+ };
+ this.loading = true;
+ getList2(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,
+ }
+ });
+ this.loading = false;
+ }, () => {
+ this.data = [];
+ this.loading = false;
+ }).catch(err => {
+ this.data = [];
+ this.loading = false;
+ });
+ }
+ }
+};
+</script>
+
+<style lang="scss">
+.margin0 {
+ margin: 0
+}
+.viewRowForm .el-form-item--default {
+ margin-bottom: 0
+}
+</style>
\ No newline at end of file
diff --git a/src/views/statreport/tablePrint.vue b/src/views/statreport/tablePrint.vue
new file mode 100644
index 0000000..9d42f9d
--- /dev/null
+++ b/src/views/statreport/tablePrint.vue
@@ -0,0 +1,43 @@
+<!--
+ * @Date: 2025-08-10 14:14:58
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-08-17 11:29:34
+ * @FilePath: /mdmweb/src/views/flowmgr/processQuery.vue
+-->
+<template>
+ <basic-container>
+ <el-tabs
+ v-model="activeName"
+ type="card"
+ class="demo-tabs"
+ >
+ <el-tab-pane label="瀹℃壒琛�" name="approve">
+ <approveTablePrint v-if="activeName==='approve'"></approveTablePrint>
+ </el-tab-pane>
+ <el-tab-pane label="纭琛�" name="confirm">
+ <confirmTablePrint v-if="activeName==='confirm'"> </confirmTablePrint>
+ </el-tab-pane>
+ </el-tabs>
+ </basic-container>
+</template>
+<script>
+import approveTablePrint from './approveTablePrint.vue';
+import confirmTablePrint from './confirmTablePrint.vue';
+
+export default {
+ components: {
+ approveTablePrint,
+ confirmTablePrint,
+ },
+ data() {
+ return {
+ activeName: 'approve',
+ };
+ },
+ methods: {
+ handleTabClick(tab, event) {
+ //console.log(tab, event);
+ },
+ },
+}
+</script>
\ No newline at end of file
--
Gitblit v1.9.3