yangys
2025-08-26 7d93a844cb9d2757d7087c716b8f78e3b34baa81
的地方
已修改2个文件
149 ■■■■ 文件已修改
src/views/flowmgr/processQuery1.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowmgr/processQuery2.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowmgr/processQuery1.vue
@@ -26,10 +26,10 @@
            <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="handleAction(scope.row, scope.index, 1)">审批表打印
                <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch' || scope.row.processDefinitionKey === 'program-cure'"
                    @click.stop="handleApproveTable(scope.row, scope.index)">审批表打印
                </el-button>
                <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">删除
                <el-button type="danger" text size="default" @click.stop="handleDelete(scope.row, scope.index, 0)">删除
                </el-button>
                
            </template>
@@ -536,41 +536,46 @@
            });
            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);
                        })
        handleDelete(row, index, flag) {
            // 处理接受或拒绝操作
            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) {
                printRow({ processInstanceId: row.processInstanceId })
                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 },
                    { 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) {
src/views/flowmgr/processQuery2.vue
@@ -18,7 +18,9 @@
            <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>
                
            </template>
        </avue-crud>
@@ -539,7 +541,7 @@
                        })
                    })
            } else if (flag === 1) {
                printRow({ processInstanceId: row.processInstanceId })
                this.$confirm('是否导出?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
@@ -561,51 +563,35 @@
            }
        },
        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();
                });
            });
        },
        selectionChange(list) {
            console.log('selectionChange', list);
            this.selectedList = list;
        },
        // exportWebSite() {
        //     if (this.selectedList.length === 0) {
        //         this.$message.warning('请先选择需要导出的数据');
        //         return;
        //     }
        //     this.$confirm('是否导出?', '提示', {
        //         confirmButtonText: '确定',
        //         cancelButtonText: '取消',
        //         type: 'warning',
        //     }).then(() => {
        //         NProgress.start();
        //         exportBlob(
        //             `/blade-mdm/machineback/filehandle/export-to-inner`,
        //             {
        //                 ids: this.selectedList.map(item => item.id).join(','),
        //             }
        //         ).then(res => {
        //             downloadXls(res.data, `导出回传涉密网${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
        //             NProgress.done();
        //         });
        //     });
        // },
        // exportExcel() {
        //     if (this.selectedList.length === 0) {
        //         this.$message.warning('请先选择需要导出的数据');
        //         return;
        //     }
        //     this.$confirm('是否导出?', '提示', {
        //         confirmButtonText: '确定',
        //         cancelButtonText: '取消',
        //         type: 'warning',
        //     }).then(() => {
        //         NProgress.start();
        //         exportBlob(
        //             `/blade-mdm/machineback/filehandle/export-excel?${this.website.tokenHeader}=${getToken()}`
        //         ).then(res => {
        //             downloadXls(res.data, `导出机床回传程序${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
        //             NProgress.done();
        //         });
        //     });
        // },
        searchChange(params, done) {
            let data = {}
            this.query = params;