|
@@ -26,7 +26,11 @@ const ProductType = {
|
|
|
},
|
|
|
isDealer: {
|
|
|
type: Boolean,
|
|
|
- default: false
|
|
|
+ default: true
|
|
|
+ },
|
|
|
+ tenantId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -38,6 +42,9 @@ const ProductType = {
|
|
|
watch: {
|
|
|
value (newValue, oldValue) {
|
|
|
this.defaultVal = newValue
|
|
|
+ },
|
|
|
+ tenantId(newValue, oldValue){
|
|
|
+ console.log(newValue)
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -50,8 +57,12 @@ const ProductType = {
|
|
|
},
|
|
|
// 产品分类列表
|
|
|
getProductType () {
|
|
|
+ const params = {}
|
|
|
+ if(this.tenantId!="NONE"){
|
|
|
+ params.tenantId = this.tenantId
|
|
|
+ }
|
|
|
if(this.isDealer){
|
|
|
- dealerProductTypeList({}).then(res => {
|
|
|
+ dealerProductTypeList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.productTypeList = res.data
|
|
|
} else {
|
|
@@ -59,7 +70,7 @@ const ProductType = {
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- productTypeQuery({}).then(res => {
|
|
|
+ productTypeQuery(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.productTypeList = res.data
|
|
|
} else {
|