Commit 16f95723 authored by jingnan's avatar jingnan 👀

添加AO保留弹框增加AO续保留逻辑

parent 0403aa26
......@@ -9,7 +9,7 @@
ref="tableCom"
:basic-data="{...basicData,dictOptions}"
class="list-table"
:lay-config="{ typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists'}"
:lay-config="layConfig"
@selectionChange="selectionChange"
/>
<div slot="footer" class="foot-btn-box">
......@@ -29,7 +29,7 @@ export default {
type: Object,
default: () => {}
},
parentTableData: {
componentProp: {
type: Object,
default: () => {}
}
......@@ -37,11 +37,23 @@ export default {
data() {
return {
selection: [],
dictOptions: []
dictOptions: [],
layConfig: { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' }
}
},
computed: {},
watch: {},
watch: {
'componentProp.name': {
immediate: true,
handler(val) {
if (val === '添加AO保留') {
this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' }
} else {
this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addOtherExtRetentionLists' }
}
}
}
},
created() {
this.getDictData()
},
......@@ -72,9 +84,11 @@ export default {
if (this.selection.length) {
const showData = this.findByNameVnode(this, 'DeeAsTable').showData
if (showData.length) {
this.selection = this.selection.filter(item => !showData.some(x => x.targetId === item.id))
const validId = this.componentProp.name === '添加AO保留' ? 'id' : 'targetId'
this.selection = this.selection.filter(item => !showData.some(x => x.targetId === item[validId]))
}
const data = this.selection.map(item => {
const data = this.selection.map(row => {
const item = this.componentProp.name === '添加AO保留' ? row : row.target
return {
operator: 'ADD',
dictOptions: this.dictOptions,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment