Commit 346763d4 authored by wangdanlei's avatar wangdanlei

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents e6e59bbe fdbe82eb
......@@ -51,7 +51,9 @@
<i :class="'tree' + node.level" />
<span v-if="node.level === 1" class="label change-text" :title="data.serialNumber">{{ data.serialNumber }}</span>
<span v-if="node.level === 2" class="change-text">{{ data.serialNumber + ',' + data.name }}</span>
<span v-if="node.level === 3" class="change-text" :class="[data.target.isOk ?'Delivery':'Finish']">{{ data.target.serialNumber + ',' + data.target.name }}</span>
<span v-if="node.level === 3&& data.target" class="change-text" :class="[data.target.isOk ?'Delivery':'Finish']">{{ data.target.serialNumber + ',' + data.target.name }}</span>
<span v-if="data.name==='转移工作包'" class="change-text Reserved">{{ data.name }}</span>
<span v-if="node.level === 4" class="change-text" :class="[data.isOk ?'Delivery':'Finish']">{{ data.serialNumber + ',' + data.name }}</span>
</span>
</span>
</el-tree>
......@@ -499,7 +501,7 @@ export default {
item.extPositionLinks.forEach(element => {
element.leaf = true
})
item.children = item.extPositionLinks
item.children = [...item.extPositionLinks, { name: '转移工作包', children: [], id: parseInt(Math.random() * 100000000000000, 10) }]
}
})
this.treeData = [
......@@ -590,6 +592,9 @@ export default {
})
},
handleNodeClick(data, node) {
if (data.name === '转移工作包') {
this.getQueryRetention(data, node)
} else {
data.activeTab = this.activeTab
data.level = node.level
data.searchStories = this.form.sortiesName
......@@ -614,6 +619,63 @@ export default {
}
})
}
}
},
getQueryRetention(data, node) {
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'state',
'operator': 'EQ',
'value': 'Approved'
},
{
'fieldName': 'enterPosition',
'operator': 'EQ',
'value': node.parent.data && node.parent.data.serialNumber || ''
},
{
'fieldName': 'sorties',
'operator': 'EQ',
'value': this.form.sortiesName || ''
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extRetentionPlanLinks'
}
],
'sortItem': [
{
'fieldName': 'createTime',
'sortOrder': 'desc'
}
]
}
post(`/ExtRetention/queryRetention`, params)
.then((res) => {
const newChildren = res.items && res.items.map(item => {
item.leaf = true
return item
})
if (newChildren) {
this.$refs.tree.updateKeyChildren(node.key, newChildren)
this.defaultExpandedKeys = [node.key]
}
}).catch(err => {
console.log(err)
}).finally(() => {
})
},
getCurrentData(data) {
if (data.level === 2 || data.level === 3) {
......
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