| | |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" > |
| | | <template #menu="scope"> |
| | | <el-button type="primary" text size="default" @click.stop="handleView(scope.row, scope.index)">查看</el-button> |
| | | <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || scope.row.flag.toLowerCase().indexOf('program')>-1" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">撤回</el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <el-dialog title="查看详情" v-model="dialogVisible" width="60%"> |
| | | <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form> |
| | |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import { getDoneList} from '@/api/flow/todolist'; |
| | | import { getDoneList,todoChangeNotify} from '@/api/flow/todolist'; |
| | | import { mapGetters } from 'vuex'; |
| | | export default { |
| | | data() { |
| | |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | menuBtn: false, |
| | | |
| | | labelWidth: 100, |
| | | span: 8, |
| | | column: [ |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '工艺版次', |
| | | label: '批次号', |
| | | prop: 'variables.craftEdition', |
| | | render: ({ row }) => { |
| | | return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || ''); |
| | |
| | | columnBtn: false, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchEnter:true, |
| | | searchMenuSpan: 6, |
| | | dialogWidth: '60%', |
| | | border: true, |
| | |
| | | selection: false, |
| | | // viewBtn: true, |
| | | menu: true, |
| | | menuWidth: 100, |
| | | menuWidth: 120, |
| | | column: [ |
| | | { |
| | | label: '关键字', |
| | |
| | | { |
| | | label: '标题', |
| | | prop: '', |
| | | width: 100, |
| | | width: 200, |
| | | render: ({ row }) => { |
| | | return h('p', |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: '创建时间', |
| | | width: 200, |
| | | width: 100, |
| | | prop: 'processCreateTime', |
| | | type: 'datetime', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | |
| | | }, |
| | | { |
| | | label: '开始时间', |
| | | width: 200, |
| | | width: 100, |
| | | prop: 'createTime', |
| | | type: 'datetime', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | |
| | | }, |
| | | { |
| | | label: '结束时间', |
| | | width: 200, |
| | | width: 100, |
| | | prop: 'endTime', |
| | | type: 'datetime', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | sortable:true, |
| | | search: false, |
| | | searchRange: true, |
| | | searchSpan: 8, |
| | |
| | | }, |
| | | { |
| | | label: '任务名称', |
| | | width: 200, |
| | | width: 100, |
| | | prop: 'taskName', |
| | | }, |
| | | { |
| | |
| | | }); |
| | | this.dialogVisible = true; |
| | | }, |
| | | handleWithdraw(row) { |
| | | //console.log(row,row.processInstanceId) |
| | | this.$confirm('确认要撤回吗?', '', { |
| | | confirmButtonText: this.$t('submitText'), |
| | | cancelButtonText: this.$t('cancelText'), |
| | | type: 'warning', |
| | | }).then(() => { |
| | | axios({ |
| | | url: '/blade-mdm/flow/mgr/withdraw', |
| | | method: 'get', |
| | | params: {processInstanceId: row.processInstanceId} |
| | | }).then(res => { |
| | | if(res.data.code !== 200) { |
| | | this.$message.error(res.data.msg); |
| | | return; |
| | | } |
| | | this.$message.success('操作成功'); |
| | | |
| | | todoChangeNotify(); |
| | | |
| | | this.refreshChange(); |
| | | }).catch(err => { |
| | | console.error(err); |
| | | //done() |
| | | }); |
| | | |
| | | }).catch(() => { |
| | | console.log('>>>>>>') |
| | | // this.$message.info('已取消操作'); |
| | | //done(); |
| | | }); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | |
| | | console.log('searchChange', params); |
| | | params.createTimeBegin = params?.processCreateTime?.[0] || ''; |
| | | params.createTimeEnd = params?.processCreateTime?.[1] || ''; |
| | | console.log(params); |
| | | //console.log(params); |
| | | // data = { |
| | | // createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '', |
| | | // createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '', |
| | |
| | | } |
| | | this.query = data |
| | | this.onLoad(this.page, data); |
| | | done(); |
| | | //done(); |
| | | }, |
| | | searchReset () { |
| | | this.loading = true; |
| | |
| | | }, |
| | | sizeChange() { |
| | | this.loading = true; |
| | | this.getList(); |
| | | this.getList(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | at1(){ |
| | | console.log('computed') |
| | | } |
| | | |
| | | }, |
| | | computed: { |
| | | |
| | | ...mapGetters(['userInfo', 'permission']), |
| | | } |
| | | } |
| | | </script> |