From c6a9d92199d79100781a8c85cec045a778e648c2 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期五, 10 五月 2024 09:30:04 +0800
Subject: [PATCH] 组合
---
web/src/views/modules/basicInfo/ProductModelTree.vue | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/web/src/views/modules/basicInfo/ProductModelTree.vue b/web/src/views/modules/basicInfo/ProductModelTree.vue
index fba71fb..a8edb11 100644
--- a/web/src/views/modules/basicInfo/ProductModelTree.vue
+++ b/web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -1,5 +1,5 @@
<template>
- <div class="product-tree-container " :style="'height:' + tree_Hei +'px'">
+ <div class="product-tree-container">
<el-input
placeholder="杈撳叆鍚嶇О杩涜杩囨护"
style="width: 60%"
@@ -30,40 +30,53 @@
export default {
name: 'ProductModelTree',
- props: {},
+ props: {
+ showXdy: {
+ type: Boolean,
+ default: true
+ },
+ },
data() {
return {
filterText: '',
productList: [],
- tree_Hei: document.documentElement.clientHeight - 200,
defaultProps: {
children: 'children',
label: 'name'
}
}
- },
+ }
+ ,
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
- },
+ }
+ ,
components: {
AddOrUpdate
- },
+ }
+ ,
mounted() {
this.getProductList()
- },
+ }
+ ,
methods: {
// 鑾峰彇绯荤粺鍒楄〃
async getProductList() {
- let res = await this.$http.get('/basicInfo/XhProductModel/tree')
+ let params = {
+ showXdy:this.showXdy
+ }
+ let res = await this.$http.get('/basicInfo/XhProductModel/tree',{params:params})
this.productList = res.data
- console.log(res.data,'async getProductList()')
- },
+ console.log(res.data, 'async getProductList()')
+ }
+ ,
add() {
- this.$refs.AddOrUpdate.$refs.dialog.init(null,{id: null, type: 'tree'})
- },
+ this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'tree'})
+ }
+ ,
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
@@ -74,3 +87,8 @@
}
}
</script>
+<style>
+ .product-tree-container {
+ height: 100%;
+ }
+</style>
--
Gitblit v1.9.1