Commit a81a6a76 authored by 王勇's avatar 王勇

站位计划维护/物料配套维护增加配套明细tab

parent 3439f9c0
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
<template slot="paneL"> <template slot="paneL">
<div class="three-member-wrap"> <div class="three-member-wrap">
<materialSupporting @getMissData="getMissData" /> <materialSupporting :state-options="stateOptions" @getMissData="getMissData" />
</div> </div>
</template> </template>
<template slot="paneR"> <template slot="paneR">
......
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
</template> </template>
<template slot="paneR"> <template slot="paneR">
<div class="right-container"> <div class="right-container">
<dee-tab :is-lazy="false" :tabs="tabItems" :show-swipe="false" :is-detail="false" @tabClick="tabClick">
<div slot="0" style="height: 100%; box-sizing: border-box">
<dee-as-com <dee-as-com
ref="detailCom" ref="detailCom"
:key="layConfig.typeName" :key="layConfig.typeName"
...@@ -62,6 +64,18 @@ ...@@ -62,6 +64,18 @@
@row-click="rowClick" @row-click="rowClick"
/> />
</div> </div>
<div slot="1" style="height: 100%; box-sizing: border-box">
<dee-as-com
ref="detailComSI1"
:key="layConfig1.typeName"
:basic-data="{stateOptions}"
:lay-config="layConfig1"
table-height="calc(100vh - 200px)"
@row-click="rowClickSpec"
/>
</div>
</dee-tab>
</div>
</template> </template>
</dee-fold-pane> </dee-fold-pane>
</div> </div>
...@@ -70,7 +84,15 @@ ...@@ -70,7 +84,15 @@
<script> <script>
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'StationPlanList', name: 'MaterialSupporting',
props: {
stateOptions: {
type: Array,
default: () => {
return []
}
}
},
data() { data() {
return { return {
form: { form: {
...@@ -90,11 +112,11 @@ export default { ...@@ -90,11 +112,11 @@ export default {
}, },
tabItems: [ tabItems: [
{ {
name: '未下达', name: '配套维护',
id: '0' id: '0'
}, },
{ {
name: '已下达', name: '配套明细',
id: '1' id: '1'
} }
], ],
...@@ -102,6 +124,11 @@ export default { ...@@ -102,6 +124,11 @@ export default {
typeName: 'JoExecutePlan', typeName: 'JoExecutePlan',
layKey: 'materialSupportingList' layKey: 'materialSupportingList'
}, },
layConfig1: {
typeName: 'ExtSupportingItem',
layKey: 'supportingItemStorage'
},
activeTab: '0',
activeNodeData: {}, activeNodeData: {},
currentNodekey: '' currentNodekey: ''
} }
...@@ -299,9 +326,17 @@ export default { ...@@ -299,9 +326,17 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.treeData[0].children[0].children[0].level = 3 this.treeData[0].children[0].children[0].level = 3
this.activeNodeData = this.treeData[0].children[0].children[0] 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) { 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.$refs.detailCom.$refs.asCom.getData(this.treeData[0].children[0].children[0])
} }
} else if (this.activeTab === '1') {
if (this.$refs.detailComSI1.$refs.asCom && this.$refs.detailComSI1.$refs.asCom.getData) {
this.$refs.detailComSI1.$refs.asCom.getData(this.treeData[0].children[0].children[0])
}
}
this.$emit('getMissData', null)
}) })
}) })
.catch((err) => console.log(err)) .catch((err) => console.log(err))
...@@ -309,18 +344,48 @@ export default { ...@@ -309,18 +344,48 @@ export default {
this.treeLoading = false this.treeLoading = false
}) })
}, },
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.activeTab === '1') {
if (this.$refs.detailComSI1.$refs.asCom && this.$refs.detailComSI1.$refs.asCom.getData) {
this.$refs.detailComSI1.$refs.asCom.getData(this.activeNodeData)
this.$emit('getMissData', null)
}
}
})
},
handleNodeClick(data, node) { handleNodeClick(data, node) {
data.level = node.level data.level = node.level
data.searchStories = this.form.sortiesName data.searchStories = this.form.sortiesName
this.activeNodeData = data this.activeNodeData = data
this.$nextTick(() => { this.$nextTick(() => {
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)
} }
} else if (this.activeTab === '1') {
if (this.$refs.detailComSI1.$refs.asCom && this.$refs.detailComSI1.$refs.asCom.getData) {
this.$refs.detailComSI1.$refs.asCom.getData(data)
}
}
this.$emit('getMissData', null)
}) })
}, },
rowClick(data) { rowClick(data) {
this.$emit('getMissData', data) this.$emit('getMissData', data)
},
rowClickSpec(data) {
const tmpData = {}
tmpData.row = data.row.extSupporting
this.$emit('getMissData', tmpData)
} }
} }
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
:basic-data="{stateOptions}" :basic-data="{stateOptions}"
:lay-config="layConfig2" :lay-config="layConfig2"
table-height="calc(100vh - 200px)" table-height="calc(100vh - 200px)"
@row-click="rowClick" @row-click="rowClickSpec"
/> />
</div> </div>
</dee-tab> </dee-tab>
...@@ -637,6 +637,11 @@ export default { ...@@ -637,6 +637,11 @@ export default {
}, },
rowClick(data) { rowClick(data) {
this.$emit('getMissData', data) this.$emit('getMissData', data)
},
rowClickSpec(data) {
const tmpData = {}
tmpData.row = data.row.extSupporting
this.$emit('getMissData', tmpData)
} }
} }
} }
......
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