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

修改站位计划页面

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