Commit a81a6a76 authored by 王勇's avatar 王勇

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

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