Commit d16f0b5d authored by jingnan's avatar jingnan 👀

指令下发增加转移工作包

parent 4065adec
......@@ -58,8 +58,9 @@
<img v-else-if="data.workingStatus === 'Run'" class="img-container" title="已开工" :src="wordImgUrl2" @click="startWorking(data)">
<img v-else class="img-container" title="已完工" :src="wordImgUrl2" @click="startWorking(data)">
</span>
<span v-if="node.level === 3 && data.type !=='cooperate'" :class="[data.isOk ?'Delivery':'Finish']">{{ data.serialNumber + ',' + data.name }}</span>
<span v-if="node.level === 3 && data.type ==='cooperate'">{{ data.name }}</span>
<span v-if="node.level === 3 && data.type !=='cooperate'&& data.type !=='transfer'" :class="[data.isOk ?'Delivery':'Finish']">{{ data.serialNumber + ',' + data.name }}</span>
<span v-if="node.level === 3 && (data.type ==='cooperate'||data.type ==='transfer')" :class="[data.type ==='transfer' ?'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>
......@@ -72,6 +73,7 @@
v-show="!isCooperate"
ref="detailCom"
:key="layConfig.layKey"
:basic-data="{requestUrl}"
table-height="calc(100vh - 100px)"
:lay-config="layConfig"
:form="searchFormData"
......@@ -130,7 +132,8 @@ export default {
skillType: '',
isCooperate: false,
currentNodekey: '',
filterText: ''
filterText: '',
requestUrl: ''
}
},
watch: {
......@@ -373,6 +376,7 @@ export default {
}
},
loadNode(node, resolve) {
this.requestUrl = ''
if (node.level === 1) {
return resolve(node.data.children)
} else if (node.level === 2) {
......@@ -428,6 +432,14 @@ export default {
element.level = 3
element.leaf = true
})
res.items.push({
positionId: node.data.id,
type: 'transfer',
serialNumber: node.data.serialNumber,
name: '转移工作包',
id: 'transfer_' + parseInt(Math.random() * 100000000000000, 10),
leaf: false
})
return resolve(res.items)
})
.catch((err) => {
......@@ -436,6 +448,8 @@ export default {
})
.finally(() => {})
}
} else if (node.level === 3 && node.data && node.data.type === 'transfer') {
this.getQueryRetention(node, resolve)
} else if (node.level === 3) {
if (node.type === 'cooperate') {
this.isCooperate = true
......@@ -460,8 +474,70 @@ export default {
const pNode = this.$refs.tree.getNode(node).parent.data
this.$bus.$emit('getMissData', pNode)
})
} else if (node.level === 4) {
this.requestUrl = `/JoExecutePlan/issuedSearch?sorties=${this.form.sortiesName}&position=${node.parentPosition}&assemblyUnit=${node.serialNumber}`
this.$nextTick(() => {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData()
}
const pNode = this.$refs.tree.getNode(node).parent.data
this.$bus.$emit('getMissData', pNode)
})
}
},
getQueryRetention(node, resolve) {
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'state',
'operator': 'EQ',
'value': 'Approved'
},
{
'fieldName': 'enterPosition',
'operator': 'EQ',
'value': node.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
item.level = 4
item.parentPosition = node.data.serialNumber || ''
return item
})
return resolve(newChildren)
}).catch(() => {
return resolve([])
})
},
formatTime() {
const d = new Date()
const year = d.getFullYear()
......@@ -661,6 +737,9 @@ export default {
.Delivery {
color: #0000ff;
}
.Reserved {
color: #ff0000;
}
.Finish {
color: #008000;
}
......
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