| | |
| | | @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" |
| | | @selection-change="selectionChange"> |
| | | <!-- <template slot="view" slot-scope="{ row }"> |
| | | <div class="custom-view-footer"> |
| | | <p>这是自定义的底部内容</p> |
| | | <p>当前行数据:{{ row }}</p> |
| | | </div> |
| | | </template> --> |
| | | |
| | | <template #menu-left> |
| | | <!-- <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> --> |
| | | |
| | | </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 type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'" |
| | | @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> --> |
| | | |
| | | <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%"> |
| | |
| | | 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, |
| | | selection: false, |
| | | menuWidth: 80, |
| | | // menu: false, |
| | | labelWidth: 90, |
| | | menuSpan: 6, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: '流程类型', |
| | | prop: 'processDefinitionKey', |
| | | label: '流程名称', |
| | | prop: 'myProcessName', |
| | | search: true, |
| | | searchType: 'select', |
| | | hide: true, |
| | | dicUrl: `/blade-mdm/system/dict/dictionary?code=flow`, |
| | | dicUrl: `/blade-system/dict-biz/dictionary?code=process_name`, |
| | | props: { |
| | | label: 'dictValue', |
| | | value: 'remark', |
| | | value: 'dictValue', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '工艺版次', |
| | | label: '批次号', |
| | | prop: 'variables.craftEdition', |
| | | width: 80, |
| | | render: ({ row }) => { |
| | |
| | | }, |
| | | { |
| | | label: '过程卡号', |
| | | prop: 'empty', |
| | | prop: '', |
| | | width: 80, |
| | | render: ({ row }) => { |
| | | return h('p', |
| | | { |
| | | attrs: {}, |
| | | class: {}, |
| | | style: {}, |
| | | }, row?.variables?.processCard) |
| | | }, |
| | | }, |
| | | { |
| | | label: '图号', |
| | |
| | | span: 8, |
| | | column: [ |
| | | { |
| | | label: '流程类型', |
| | | prop: 'processDefinitionKey', |
| | | label: '流程名称', |
| | | prop: '', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.processDefinitionKey) |
| | | }, |
| | | return h('p',{'class': 'margin0'}, row?.variables.myProcessName) |
| | | } |
| | | }, |
| | | { |
| | | label: '创建时间', |
| | |
| | | return h('p',{'class': 'margin0'}, row?.variables?.title) |
| | | } |
| | | }, |
| | | |
| | | { |
| | | label: '流程名称', |
| | | prop: '', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables.myProcessName) |
| | | } |
| | | }, |
| | | { |
| | | label: '工艺版次', |
| | | label: '批次号', |
| | | prop: 'variables.craftEdition', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || ''); |
| | |
| | | }, |
| | | { |
| | | label: '过程卡号', |
| | | prop: 'empty', |
| | | prop: '', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.empty || ''); |
| | | return h('p',{'class': 'margin0'}, row?.variables?.processCard || ''); |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '偏离单号', |
| | | label: '临时更改单号', |
| | | prop: '', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.deviation || ''); |
| | |
| | | }) |
| | | }) |
| | | } else if (flag === 1) { |
| | | printRow({ processInstanceId: row.processInstanceId }) |
| | | |
| | | this.$confirm('是否导出?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | } |
| | | |
| | | }, |
| | | 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; |
| | | }, |
| | | // 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; |
| | |
| | | createTimeBegin: params.createTimeBegin || undefined, |
| | | createTimeEnd: params.createTimeEnd || undefined, |
| | | keyword: params.keyword || undefined, |
| | | processDefinitionKey: params.processDefinitionKey || undefined |
| | | myProcessName: params.myProcessName || undefined |
| | | } |
| | | this.query = data |
| | | this.onLoad(this.page, data); |
| | |
| | | createTimeBegin: params.createTimeBegin, |
| | | createTimeEnd: params.createTimeEnd, |
| | | keyword: params.keyword || '', |
| | | processDefinitionKey: params.processDefinitionKey || '' |
| | | myProcessName: params.myProcessName || '' |
| | | } |
| | | this.onLoad(this.page, data); |
| | | done(); |
| | |
| | | createTimeBegin: params.createTimeBegin, |
| | | createTimeEnd: params.createTimeEnd, |
| | | keyword: params.keyword || '', |
| | | processDefinitionKey: params.processDefinitionKey || '' |
| | | myProcessName: params.myProcessName || '' |
| | | }; |
| | | this.loading = true; |
| | | getList2(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => { |