|
@@ -34,7 +34,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<CostAuditTable
|
|
<CostAuditTable
|
|
|
- :table-data="localWorkflowData.list"
|
|
|
|
|
|
|
+ :table-data="workflowData.list"
|
|
|
:columns="workflowData.listColumns"
|
|
:columns="workflowData.listColumns"
|
|
|
:show-index="true"
|
|
:show-index="true"
|
|
|
:show-action-column="true"
|
|
:show-action-column="true"
|
|
@@ -79,7 +79,7 @@
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</div>
|
|
</div>
|
|
|
<CostAuditTable
|
|
<CostAuditTable
|
|
|
- :table-data="localWorkflowData.stepList"
|
|
|
|
|
|
|
+ :table-data="workflowData.stepList"
|
|
|
:columns="workflowData.workflowColumns"
|
|
:columns="workflowData.workflowColumns"
|
|
|
:show-index="true"
|
|
:show-index="true"
|
|
|
:show-pagination="true"
|
|
:show-pagination="true"
|
|
@@ -87,7 +87,7 @@
|
|
|
:table-props="{
|
|
:table-props="{
|
|
|
maxHeight: '500',
|
|
maxHeight: '500',
|
|
|
}"
|
|
}"
|
|
|
- :pagination="localWorkflowData.pagination"
|
|
|
|
|
|
|
+ :pagination="workflowData.pagination"
|
|
|
@pagination-change="handlePaginationChange"
|
|
@pagination-change="handlePaginationChange"
|
|
|
>
|
|
>
|
|
|
<template #mainUserId="{ row }">
|
|
<template #mainUserId="{ row }">
|
|
@@ -278,7 +278,6 @@
|
|
|
saveProcess,
|
|
saveProcess,
|
|
|
} from '@/api/taskCustomizedRelease.js'
|
|
} from '@/api/taskCustomizedRelease.js'
|
|
|
import CostAuditTable from '@/components/costAudit/CostAuditTable.vue'
|
|
import CostAuditTable from '@/components/costAudit/CostAuditTable.vue'
|
|
|
- import { RFC_2822 } from 'moment'
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: { CostAuditTable },
|
|
components: { CostAuditTable },
|
|
|
mixins: [taskMixin],
|
|
mixins: [taskMixin],
|
|
@@ -292,31 +291,13 @@
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false,
|
|
default: false,
|
|
|
},
|
|
},
|
|
|
- workflowData: {
|
|
|
|
|
- type: Object,
|
|
|
|
|
- default: () => ({
|
|
|
|
|
- list: [],
|
|
|
|
|
- detailInfo: {},
|
|
|
|
|
- }),
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
- return {
|
|
|
|
|
- localWorkflowData: { ...this.workflowData },
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return {}
|
|
|
},
|
|
},
|
|
|
computed: {},
|
|
computed: {},
|
|
|
- watch: {
|
|
|
|
|
- workflowData: {
|
|
|
|
|
- handler(newVal) {
|
|
|
|
|
- this.localWorkflowData = { ...newVal }
|
|
|
|
|
- },
|
|
|
|
|
- deep: true,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- mounted() {
|
|
|
|
|
- this.localWorkflowData = { ...this.workflowData }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ mounted() {},
|
|
|
|
|
+
|
|
|
methods: {
|
|
methods: {
|
|
|
formatterUserList(userId) {
|
|
formatterUserList(userId) {
|
|
|
return this.userList.filter((item) => item.userId !== userId)
|
|
return this.userList.filter((item) => item.userId !== userId)
|
|
@@ -324,27 +305,25 @@
|
|
|
handleSetWorkflow() {
|
|
handleSetWorkflow() {
|
|
|
this.getUser()
|
|
this.getUser()
|
|
|
this.dialogs.setStepDialogVisible = true
|
|
this.dialogs.setStepDialogVisible = true
|
|
|
- if (this.localWorkflowData.list.length > 0) {
|
|
|
|
|
- this.localWorkflowData.stepList = this.localWorkflowData.list
|
|
|
|
|
- this.localWorkflowData.stepList = this.localWorkflowData.list.map(
|
|
|
|
|
- (item) => ({
|
|
|
|
|
- ...item,
|
|
|
|
|
- userId: item.userId ? item.userId.split(',') : [],
|
|
|
|
|
- status: item.status ? item.status.split(',') : [],
|
|
|
|
|
- })
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ if (this.workflowData.list.length > 0) {
|
|
|
|
|
+ this.workflowData.stepList = this.workflowData.list
|
|
|
|
|
+ this.workflowData.stepList = this.workflowData.list.map((item) => ({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ userId: item.userId ? item.userId.split(',') : [],
|
|
|
|
|
+ status: item.status ? item.status.split(',') : [],
|
|
|
|
|
+ }))
|
|
|
} else {
|
|
} else {
|
|
|
getCostProjectNodeTmpletePageList({
|
|
getCostProjectNodeTmpletePageList({
|
|
|
- pageNum: this.localWorkflowData.pagination.currentPage,
|
|
|
|
|
- pageSize: this.localWorkflowData.pagination.pageSize,
|
|
|
|
|
|
|
+ pageNum: this.workflowData.pagination.currentPage,
|
|
|
|
|
+ pageSize: this.workflowData.pagination.pageSize,
|
|
|
processId: '1',
|
|
processId: '1',
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- this.localWorkflowData.stepList = res.value.records.map((item) => ({
|
|
|
|
|
|
|
+ this.workflowData.stepList = res.value.records.map((item) => ({
|
|
|
...item,
|
|
...item,
|
|
|
userId: item.userId ? item.userId.split(',') : [],
|
|
userId: item.userId ? item.userId.split(',') : [],
|
|
|
status: item.status ? item.status.split(',') : [],
|
|
status: item.status ? item.status.split(',') : [],
|
|
|
}))
|
|
}))
|
|
|
- this.localWorkflowData.pagination.total = res.value.total
|
|
|
|
|
|
|
+ this.workflowData.pagination.total = res.value.total
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -371,24 +350,22 @@
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
if (type == 'list') {
|
|
if (type == 'list') {
|
|
|
- this.localWorkflowData.list = this.localWorkflowData.list.map(
|
|
|
|
|
- (item) => {
|
|
|
|
|
- if (
|
|
|
|
|
- item.processNodeKey ==
|
|
|
|
|
- this.formData.currentStep.processNodeKey
|
|
|
|
|
- ) {
|
|
|
|
|
- return {
|
|
|
|
|
- ...item,
|
|
|
|
|
- ...this.formData.currentStep,
|
|
|
|
|
- userId: this.formData.currentStep.userId.join(','),
|
|
|
|
|
- status: this.formData.currentStep.status.join(','),
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.workflowData.list = this.workflowData.list.map((item) => {
|
|
|
|
|
+ if (
|
|
|
|
|
+ item.processNodeKey ==
|
|
|
|
|
+ this.formData.currentStep.processNodeKey
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ ...this.formData.currentStep,
|
|
|
|
|
+ userId: this.formData.currentStep.userId.join(','),
|
|
|
|
|
+ status: this.formData.currentStep.status.join(','),
|
|
|
}
|
|
}
|
|
|
- return item
|
|
|
|
|
}
|
|
}
|
|
|
- )
|
|
|
|
|
|
|
+ return item
|
|
|
|
|
+ })
|
|
|
// 触发自定义事件通知父组件数据已更新
|
|
// 触发自定义事件通知父组件数据已更新
|
|
|
- this.$emit('update:workflowData', { ...this.localWorkflowData })
|
|
|
|
|
|
|
+ this.$emit('update:workflowData', { ...this.workflowData })
|
|
|
this.handleSaveSetStep('list')
|
|
this.handleSaveSetStep('list')
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|