Commit e8f5036d authored by “lixuyan”'s avatar “lixuyan”

修改站位计划页面

parent 66d130e0
......@@ -569,9 +569,7 @@ export default {
},
formatDate(date) {
var text =
new Date(date).toLocaleDateString().split('/').join('-') +
' ' +
new Date(date).toTimeString().split(' ')[0]
new Date(date).toLocaleDateString().split('/').join('-')
return text
},
/**
......
......@@ -121,8 +121,12 @@ export default {
methods: {
getMissData(data) {
this.rowData = data
this.getMissInfo(data.row.extProcessPlan)
if (data) {
this.rowData = data
this.getMissInfo(data.row.extProcessPlan)
} else {
this.$set(this.missInfo, 'missList', [])
}
},
// getPageData(val) {
// this.getMissInfo(this.rowData.row, val)
......
......@@ -313,25 +313,45 @@ export default {
children: data
}
]
this.defaultExpandedKeys = [this.treeData[0].children[0].id]
this.currentNodekey = this.treeData[0].children[0].children[0].id
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey)
})
this.$nextTick(() => {
this.treeData[0].children[0].children[0].level = 3
this.activeNodeData = this.treeData[0].children[0].children[0]
this.treeData[0].children[0].children[0].activeTab = this.activeTab
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(this.treeData[0].children[0].children[0])
if (data.length > 0) {
this.defaultExpandedKeys = [this.treeData[0].children[0].id]
this.currentNodekey = this.treeData[0].children[0].children[0].id
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey)
})
this.$nextTick(() => {
this.treeData[0].children[0].children[0].level = 3
this.activeNodeData = this.treeData[0].children[0].children[0]
this.treeData[0].children[0].children[0].activeTab = this.activeTab
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(this.treeData[0].children[0].children[0])
this.$emit('getMissData', null)
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(this.treeData[0].children[0].children[0])
this.$emit('getMissData', null)
}
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(this.treeData[0].children[0].children[0])
})
} else {
this.activeNodeData = {}
this.activeNodeData.searchStories = this.form.sortiesName
this.$nextTick(() => {
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(this.activeNodeData)
this.$emit('getMissData', null)
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(this.activeNodeData)
this.$emit('getMissData', null)
}
}
}
})
})
}
})
.catch((err) => console.log(err))
.finally(() => {
......@@ -341,14 +361,17 @@ export default {
tabClick(val) {
this.activeTab = val.index
this.activeNodeData.activeTab = this.activeTab
this.activeNodeData.searchStories = this.form.sortiesName
this.$nextTick(() => {
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(this.activeNodeData)
this.$emit('getMissData', null)
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(this.activeNodeData)
this.$emit('getMissData', null)
}
}
})
......@@ -363,10 +386,12 @@ export default {
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(data)
this.$emit('getMissData', null)
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(data)
this.$emit('getMissData', null)
}
}
})
......@@ -378,10 +403,12 @@ export default {
if (this.activeTab === '0') {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(data)
this.$emit('getMissData', null)
}
} else {
if (this.$refs.detailCom2.$refs.asCom && this.$refs.detailCom2.$refs.asCom.getData) {
this.$refs.detailCom2.$refs.asCom.getData(data)
this.$emit('getMissData', null)
}
}
})
......
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