Commit 45727f17 authored by jingnan's avatar jingnan 👀

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

parents 23b763ba a81a6a76
...@@ -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,13 +54,27 @@ ...@@ -54,13 +54,27 @@
</template> </template>
<template slot="paneR"> <template slot="paneR">
<div class="right-container"> <div class="right-container">
<dee-as-com <dee-tab :is-lazy="false" :tabs="tabItems" :show-swipe="false" :is-detail="false" @tabClick="tabClick">
ref="detailCom" <div slot="0" style="height: 100%; box-sizing: border-box">
:key="layConfig.typeName" <dee-as-com
:lay-config="layConfig" ref="detailCom"
table-height="calc(100vh - 140px)" :key="layConfig.typeName"
@row-click="rowClick" :lay-config="layConfig"
/> table-height="calc(100vh - 140px)"
@row-click="rowClick"
/>
</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> </div>
</template> </template>
</dee-fold-pane> </dee-fold-pane>
...@@ -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]
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) { this.treeData[0].children[0].children[0].activeTab = this.activeTab
this.$refs.detailCom.$refs.asCom.getData(this.treeData[0].children[0].children[0]) 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])
}
} 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.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) { if (this.activeTab === '0') {
this.$refs.detailCom.$refs.asCom.getData(data) if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
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