yangys
2025-09-04 2781142ab67deba83925da706ca26b7f8ea1a759
src/views/flowmgr/processQuery1.vue
@@ -20,16 +20,16 @@
                <!-- <el-button type="primary" plain @click="exportWebSite">导出回传涉密网</el-button> -->
                <!-- <el-button type="primary" plain @click="reassign">挂载车床程序库</el-button> -->
                <!-- <el-button type="primary" plain @click="exportExcel">导出到EXCEL</el-button> -->
                <el-button type="primary" plain @click="reassign">重新指派
                </el-button>
                <!-- <el-button type="primary" plain @click="reassign">重新指派</el-button>-->
            </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="handleAction(scope.row, scope.index, 1)">审批表打印
                </el-button>
                <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">删除
                <!--
                <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="handleDelete(scope.row, scope.index, 0)">删除
                </el-button>
                
            </template>
@@ -82,17 +82,14 @@
                viewBtn: false,
                columnBtn: false,
                tip: false,
                // simplePage: true,
                searchShow: true,
                searchMenuSpan: 7,
                searchEnter:true,
                dialogWidth: '70%',
                // tree: true,
                border: true,
                index: true,
                selection: true,
                menuWidth: 200,
                // menu: false,
                selection: false,
                menuWidth: 100,
                dialogClickModal: false,
                column: [
                    {
@@ -128,6 +125,7 @@
               {
                        label: '标题',
                        prop: 'variables.title',
                        showOverflowTooltip:true,
                        width: 150,
                  render: ({ row }) => {
                            return h('p',
@@ -148,7 +146,8 @@
               {
                        label: '流程名称',
                        prop: '',
                        width: 80,
                        width: 85,
                        showOverflowTooltip:true,
                  render: ({ row }) => {
                            return h('p',
                                {
@@ -158,12 +157,13 @@
                                }, row?.variables?.myProcessName)
                        }
                    },
                    {
                        label: '工艺版次',
                        prop: 'variables.craftEdition',
                        width: 80,
                        label: '零组件号',
                        prop: 'drawingNo',
                        width: 82,
                        render: ({ row }) => {
                            return h('span', {}, row?.variables?.craftEdition || '');
                            return h('span', {}, row?.variables?.drawingNo || '');
                        }
                    },
                    {
@@ -177,7 +177,7 @@
                    {
                        label: '工序名称',
                        prop: 'processName',
                        width: 80,
                        width: 82,
                        render: ({ row }) => {
                            return h('span', {}, row?.variables?.processName || '');
                        }
@@ -185,23 +185,23 @@
                    {
                        label: '工序版次',
                        prop: 'processEdition',
                        width: 80,
                        width: 82,
                        render: ({ row }) => {
                            return h('span', {}, row?.variables?.processEdition || '');
                        }
                    },
                    {
                        label: '零组件号',
                        prop: 'drawingNo',
                        width: 80,
                   {
                        label: '批次号',
                        prop: 'variables.craftEdition',
                        width: 70,
                        render: ({ row }) => {
                            return h('span', {}, row?.variables?.drawingNo || '');
                            return h('span', {}, row?.variables?.craftEdition || '');
                        }
                    },
                    {
                        label: '任务车间',
                        prop: 'workshop',
                        width: 80,
                        width: 82,
                        render: ({ row }) => {
                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
                        }
@@ -209,28 +209,9 @@
                    {
                        label: '过程卡号',
                        prop: 'empty',
                        width: 80,
                        width: 82,
                    },
               {
                        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: '',
@@ -255,6 +236,7 @@
                    {
                        label: '机床',
                        prop: '',
                        showOverflowTooltip:true,
                        render: ({ row }) => {
                            return h('p',
                                {
@@ -279,16 +261,19 @@
                    {
                        label: '创建时间',
                        prop: 'processCreateTime',
                        showOverflowTooltip:true,
                        width: 82,
                    },
                    {
                        label: '当前节点',
                        prop: 'taskName',
                  width: 90
                        showOverflowTooltip:true,
                  width: 110
                    },
                    {
                        label: '计划加工时间',
                        prop: 'planStartTime',
                        width: 180,
                        width: 110,
                        render: ({ row }) => {
                            return h('span', {}, row?.variables?.planStartTime || '');
                        }
@@ -333,8 +318,9 @@
                    },
                   
                    {
                        label: '工艺版次',
                        label: '批次号',
                        prop: 'variables.craftEdition',
                        render: ({ row }) => {
                            return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
                        }
@@ -535,41 +521,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) {