diff --git a/sgzb-screen/src/components/home/countFlopOne.vue b/sgzb-screen/src/components/home/countFlopOne.vue index f4d4a10d..0b0b5dd0 100644 --- a/sgzb-screen/src/components/home/countFlopOne.vue +++ b/sgzb-screen/src/components/home/countFlopOne.vue @@ -40,7 +40,8 @@ export default { return { value: [], numberList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - compKey: 0 + compKey: 0, + maType: '' }; }, props: ["val", "suffix", 'sonTitle'], @@ -52,12 +53,18 @@ export default { }, mounted() { this.value = this.val.toString().split(""); + this.$eventBus.$on('maType', (maType) => { + this.maType = maType + }); + }, + destroyed() { + this.$eventBus.$off('maType'); }, methods: { - handleClick(val) { + handleClick() { const params = { open: true, - maType: val + maType: this.maType } this.$refs.materialsDialog.setOpen(params); } diff --git a/sgzb-screen/src/components/home/countFlopTwo.vue b/sgzb-screen/src/components/home/countFlopTwo.vue index 3d2d46df..17a69e69 100644 --- a/sgzb-screen/src/components/home/countFlopTwo.vue +++ b/sgzb-screen/src/components/home/countFlopTwo.vue @@ -41,7 +41,8 @@ export default { return { value: [], numberList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - compKey: 0 + compKey: 0, + maType: '' }; }, props: ["val", "suffix", 'sonTitle'], @@ -53,12 +54,18 @@ export default { }, mounted() { this.value = this.val.toString().split(""); + this.$eventBus.$on('maType', (maType) => { + this.maType = maType + }); + }, + destroyed() { + this.$eventBus.$off('maType'); }, methods: { - handleClick(val) { + handleClick() { const params = { open: true, - maType: val + maType: this.maType } this.$refs.returnMaterialsDialog.setOpen(params); } diff --git a/sgzb-screen/src/components/home/getMaterialsDialog.vue b/sgzb-screen/src/components/home/getMaterialsDialog.vue index 972868d8..21c5e4a4 100644 --- a/sgzb-screen/src/components/home/getMaterialsDialog.vue +++ b/sgzb-screen/src/components/home/getMaterialsDialog.vue @@ -166,6 +166,7 @@ export default { setOpen(params) { this.open = params.open this.maType = params.maType + console.log('🚀 ~ setOpen ~ this.maType:', this.maType); this.tableData = [] this.total = 0 setTimeout(() => { diff --git a/sgzb-screen/src/views/Home/index.vue b/sgzb-screen/src/views/Home/index.vue index 8224a02a..e45761cd 100644 --- a/sgzb-screen/src/views/Home/index.vue +++ b/sgzb-screen/src/views/Home/index.vue @@ -27,7 +27,7 @@
- +