| | |
| | | |
| | | </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'; |
| | |
| | | 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', |
| | |
| | | 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 || ''); |
| | | } |
| | | }, |
| | | { |
| | |
| | | return h('span', {}, row?.variables?.processEdition || ''); |
| | | } |
| | | }, |
| | | { |
| | | label: '零组件号', |
| | | prop: 'drawingNo', |
| | | width: 80, |
| | | render: ({ row }) => { |
| | | return h('span', {}, row?.variables?.drawingNo || ''); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | label: '任务车间', |
| | | prop: 'workshop', |
| | |
| | | }, |
| | | { |
| | | label: '过程卡号', |
| | | prop: 'empty', |
| | | prop: '', |
| | | width: 80, |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.processCard || ''); |
| | | }, |
| | | }, |
| | | { |
| | | label: '图号', |
| | |
| | | } |
| | | }, |
| | | { |
| | | 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 || ''); |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: '过程卡号', |
| | | prop: 'empty', |
| | | prop: '', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.empty || ''); |
| | | return h('p',{'class': 'margin0'}, row?.variables?.processCard || ''); |
| | | } |
| | | }, |
| | | { |
| | |
| | | }); |
| | | 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] |
| | |
| | | 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; |