Commit 196b571b authored by jingnan's avatar jingnan 👀

添加AO保留弹框修改

parent 257603fb
...@@ -41,12 +41,16 @@ export default { ...@@ -41,12 +41,16 @@ export default {
layConfig: { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' } layConfig: { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' }
} }
}, },
computed: {}, computed: {
isAddAO() {
return this.componentProp.name === '添加AO保留'
}
},
watch: { watch: {
'componentProp.name': { isAddAO: {
immediate: true, immediate: true,
handler(val) { handler(val) {
if (val === '添加AO保留') { if (val) {
this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' } this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addExtRetentionLists' }
} else { } else {
this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addOtherExtRetentionLists' } this.layConfig = { typeName: 'ExtProcessPlan', layKey: 'addOtherExtRetentionLists' }
...@@ -84,15 +88,23 @@ export default { ...@@ -84,15 +88,23 @@ export default {
if (this.selection.length) { if (this.selection.length) {
const showData = this.findByNameVnode(this, 'DeeAsTable').showData const showData = this.findByNameVnode(this, 'DeeAsTable').showData
if (showData.length) { if (showData.length) {
const validId = this.componentProp.name === '添加AO保留' ? 'id' : 'targetId' const validId = this.isAddAO ? 'id' : 'targetId'
this.selection = this.selection.filter(item => !showData.some(x => x.targetId === item[validId])) this.selection = this.selection.filter(item => !showData.some(x => x.targetId === item[validId]))
} }
const data = this.selection.map(row => { const data = this.selection.map(row => {
const item = this.componentProp.name === '添加AO保留' ? row : row.target let item = ''
let assemblyUnit = ''
if (this.isAddAO) {
item = row
assemblyUnit = this.getCaNo(item.targetExtProcessUsageLink && item.targetExtProcessUsageLink[0] && item.targetExtProcessUsageLink[0].source)
} else {
item = row.target
assemblyUnit = row.assemblyUnit
}
return { return {
operator: 'ADD', operator: 'ADD',
dictOptions: this.dictOptions, dictOptions: this.dictOptions,
assemblyUnit: this.getCaNo(item.targetExtProcessUsageLink && item.targetExtProcessUsageLink[0] && item.targetExtProcessUsageLink[0].source), assemblyUnit: assemblyUnit,
target: item, target: item,
targetId: item.id, targetId: item.id,
targetIdType: 'ExtProcessPlan', targetIdType: 'ExtProcessPlan',
......
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