You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
<template>
|
|
<!-- <el-cascader style="width: 100%"
|
|
ref="cascader"
|
|
:options="productGroupList"
|
|
:props="{ checkStrictly: true,label: 'groupName',value: 'id',children: 'childs' }"
|
|
clearable></el-cascader> -->
|
|
|
|
<el-select v-model="productGroup" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in productGroupList"
|
|
:key="item.shopGroupId"
|
|
:label="item.groupName"
|
|
:value="item.shopGroupId">
|
|
</el-option>
|
|
</el-select>
|
|
</template>
|
|
|
|
<script>
|
|
import api from '@@/components/canvasShow/config/api'
|
|
import {sendReqMixin} from '@@/components/canvasShow/config/mixin'
|
|
import {checkEmptyChild} from '@@/config/common'
|
|
import {getShopId} from "@@/utils/auth.js"
|
|
export default {
|
|
name: 'product-group-select',
|
|
mixins: [sendReqMixin],
|
|
data () {
|
|
return {
|
|
productGroupList: [],
|
|
productGroup : {}
|
|
}
|
|
},
|
|
mounted () {
|
|
this.getProductGroup()
|
|
},
|
|
methods: {
|
|
// 获取类别
|
|
getProductGroup () {
|
|
var _this = this
|
|
// let shopId = parseInt(getShopId())
|
|
// var paramsUrl = `${api.getProductGroup}?`
|
|
// if (shopId) {
|
|
// paramsUrl += `&shopId=${shopId}`
|
|
// }
|
|
let params = {
|
|
url: api.getProductGroup,
|
|
method: 'GET',
|
|
project: '0'
|
|
}
|
|
this.sendReq(params, (res) => {
|
|
_this.productGroupList = res.data
|
|
checkEmptyChild(_this.productGroupList)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|