Commit 617ddee8 authored by jingnan's avatar jingnan 👀

解决开启虚拟DOM之后页签下的表格初次渲染树形结构无法展开的问题

parent f8bebe47
...@@ -81,7 +81,10 @@ export default { ...@@ -81,7 +81,10 @@ export default {
basicData: { selectData: _that.selectData, selectionRows: [] }, basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false, loadingMaterial: false,
loadingAirEquipment: false, loadingAirEquipment: false,
loadingOutSource: false loadingOutSource: false,
firstMaterialClick: true,
firstOutSourceClick: false,
firstAirEquipmentClick: false
} }
}, },
computed: { computed: {
...@@ -135,6 +138,16 @@ export default { ...@@ -135,6 +138,16 @@ export default {
}, },
tabClick() { tabClick() {
this.$set(this.basicData, 'selectionRows', []) this.$set(this.basicData, 'selectionRows', [])
if (this['first' + this.active + 'Click']) return
this['first' + this.active + 'Click'] = true
if (['AirEquipment', 'OutSource'].includes(this.active)) {
this.$nextTick(() => {
const com = this.$utils._get(this.$refs[this.active + 'Table'], '$refs.asCom')
if (com && com.showData) {
com.showData = [...com.showData]
}
})
}
} }
} }
} }
......
<!--
* @Author: gjn
* @Date: 2023-08-04 10:29:39
* @Description:批量签审_理化实验入库响应
-->
<template>
<div class="jobResponseInExperiment">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data=" { selectData,selectionRows }"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInExperiment'}"
@selectionChange="selectionChange"
/>
</div>
</template>
<script>
export default {
name: 'JobResponseInExperiment',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: []
}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang='scss'>
.jobResponseInExperiment{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@searchEvent="searchEvent" @searchEvent="searchEvent"
/> />
<!-- tab页签 --> <!-- tab页签 -->
<el-tabs v-model="active" type="border-card" class="detailTabs"> <el-tabs v-model="active" type="border-card" class="detailTabs" @tab-click="tabClick">
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material"> <el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com <dee-as-com
ref="MaterialTable" ref="MaterialTable"
...@@ -75,7 +75,10 @@ export default { ...@@ -75,7 +75,10 @@ export default {
], ],
loadingMaterial: false, loadingMaterial: false,
loadingAirEquipment: false, loadingAirEquipment: false,
loadingOutSource: false loadingOutSource: false,
firstMaterialClick: true,
firstOutSourceClick: false,
firstAirEquipmentClick: false
} }
}, },
computed: { computed: {
...@@ -122,6 +125,18 @@ export default { ...@@ -122,6 +125,18 @@ export default {
el.$refs.asCom.getData(this.searchItems) el.$refs.asCom.getData(this.searchItems)
} }
}) })
},
tabClick(val) {
if (this['first' + this.active + 'Click']) return
this['first' + this.active + 'Click'] = true
if (['AirEquipment', 'OutSource'].includes(this.active)) {
this.$nextTick(() => {
const com = this.$utils._get(this.$refs[this.active + 'Table'], '$refs.asCom')
if (com && com.showData) {
com.showData = [...com.showData]
}
})
}
} }
} }
} }
......
...@@ -81,7 +81,10 @@ export default { ...@@ -81,7 +81,10 @@ export default {
basicData: { selectData: _that.selectData, selectionRows: [] }, basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false, loadingMaterial: false,
loadingAirEquipment: false, loadingAirEquipment: false,
loadingOutSource: false loadingOutSource: false,
firstMaterialClick: true,
firstOutSourceClick: false,
firstAirEquipmentClick: false
} }
}, },
computed: { computed: {
...@@ -127,6 +130,16 @@ export default { ...@@ -127,6 +130,16 @@ export default {
}, },
tabClick() { tabClick() {
this.$set(this.basicData, 'selectionRows', []) this.$set(this.basicData, 'selectionRows', [])
if (this['first' + this.active + 'Click']) return
this['first' + this.active + 'Click'] = true
if (['AirEquipment', 'OutSource'].includes(this.active)) {
this.$nextTick(() => {
const com = this.$utils._get(this.$refs[this.active + 'Table'], '$refs.asCom')
if (com && com.showData) {
com.showData = [...com.showData]
}
})
}
} }
} }
} }
......
...@@ -81,7 +81,10 @@ export default { ...@@ -81,7 +81,10 @@ export default {
basicData: { selectData: _that.selectData, selectionRows: [] }, basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false, loadingMaterial: false,
loadingAirEquipment: false, loadingAirEquipment: false,
loadingOutSource: false loadingOutSource: false,
firstMaterialClick: true,
firstOutSourceClick: false,
firstAirEquipmentClick: false
} }
}, },
computed: { computed: {
...@@ -135,6 +138,16 @@ export default { ...@@ -135,6 +138,16 @@ export default {
}, },
tabClick() { tabClick() {
this.$set(this.basicData, 'selectionRows', []) this.$set(this.basicData, 'selectionRows', [])
if (this['first' + this.active + 'Click']) return
this['first' + this.active + 'Click'] = true
if (['AirEquipment', 'OutSource'].includes(this.active)) {
this.$nextTick(() => {
const com = this.$utils._get(this.$refs[this.active + 'Table'], '$refs.asCom')
if (com && com.showData) {
com.showData = [...com.showData]
}
})
}
} }
} }
} }
......
<!--
* @Author: gjn
* @Date: 2023-11-10 10:29:39
* @Description:批量签审_检验入库响应
-->
<template>
<div class="warehouseInTest">
<dee-as-com
:key="refreshKey"
ref="applyTable"
class="list-table"
:basic-data=" { selectData,selectionRows }"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInTest'}"
@selectionChange="selectionChange"
/>
</div>
</template>
<script>
export default {
name: 'WarehouseInTest',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: [],
refreshKey: 1
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.$bus.$on('refreshBackItem', () => {
this.$nextTick(() => {
this.refreshKey++
})
})
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang='scss'>
.warehouseInTest{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
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