From 9cd1015119d48245c1758e1bcddd70cff0d496ab Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 06 九月 2025 09:50:52 +0800
Subject: [PATCH] word版审批表,确认表
---
src/views/statreport/confirmTablePrint.vue | 226 ++++-----------------------------------------
src/views/statreport/approveTablePrint.vue | 1
src/api/statreport/confirmtable.js | 18 +++
3 files changed, 40 insertions(+), 205 deletions(-)
diff --git a/src/api/statreport/confirmtable.js b/src/api/statreport/confirmtable.js
new file mode 100644
index 0000000..8ada577
--- /dev/null
+++ b/src/api/statreport/confirmtable.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 getConfirmTableList = (current, size, params) => {
+ return request({
+ url: '/blade-mdm/statreport/tableprint/confirm-page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ },
+ })
+};
\ No newline at end of file
diff --git a/src/views/statreport/approveTablePrint.vue b/src/views/statreport/approveTablePrint.vue
index cdd4c2d..634ba29 100644
--- a/src/views/statreport/approveTablePrint.vue
+++ b/src/views/statreport/approveTablePrint.vue
@@ -142,6 +142,7 @@
let name = res.headers['content-disposition'].split('filename=')[1]
//console.log(res.headers['content-disposition'].split('filename=')[1]);
name = decodeURI(name)
+ console.log(name)
downloadFile(res.data, `${name}`);
NProgress.done();
});
diff --git a/src/views/statreport/confirmTablePrint.vue b/src/views/statreport/confirmTablePrint.vue
index 75fa687..c4cf54d 100644
--- a/src/views/statreport/confirmTablePrint.vue
+++ b/src/views/statreport/confirmTablePrint.vue
@@ -15,39 +15,18 @@
</template>
<template #menu="scope">
- <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
+ <el-button type="primary" text size="default" @click.stop="handleConfirmTable(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 { getConfirmTableList } from '@/api/statreport/confirmtable.js';
+import { getAssignee, } from '@/api/flow/todolist';
import { exportBlobPost } from '@/api/common';
import NProgress from 'nprogress';
import { downloadFile } from '@/utils/util';
@@ -83,24 +62,13 @@
border: true,
index: true,
selection: false,
- menuWidth: 80,
+ menuWidth: 100,
// 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',
@@ -119,45 +87,21 @@
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: 'drawingNo',
+ width: 80,
+ render: ({ row }) => {
+ return h('span', {}, row?.variables?.drawingNo || '');
}
},
{
@@ -184,14 +128,7 @@
return h('span', {}, row?.variables?.processEdition || '');
}
},
- {
- label: '闆剁粍浠跺彿',
- prop: 'drawingNo',
- width: 80,
- render: ({ row }) => {
- return h('span', {}, row?.variables?.drawingNo || '');
- }
- },
+
{
label: '浠诲姟杞﹂棿',
prop: 'workshop',
@@ -266,34 +203,8 @@
}
},
{
- 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 || '');
- }
},
],
},
@@ -494,112 +405,18 @@
});
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('鏄惁瀵煎嚭纭琛�?', '鎻愮ず', {
+ this.$confirm('鏄惁瀵煎嚭纭琛�1?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning',
}).then(() => {
- console.log(this.selection)
+
NProgress.start();
exportBlobPost(
- `/blade-mdm/flow/mgr/export-confirm-table`,
+ `/blade-mdm/statreport/tableprint/export-confirm-table`,
{ processInstanceId: row.processInstanceId }
).then(res => {
let name = res.headers['content-disposition'].split('filename=')[1]
@@ -676,13 +493,12 @@
myProcessName: params.myProcessName || ''
};
this.loading = true;
- getList2(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
+ getConfirmTableList(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;
--
Gitblit v1.9.3