1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| <template>
| <el-cascader
| ref="elCascader"
| :options="options"
| :show-all-levels="false"
| :props="defaultProps"
| v-model="dataValue"
| :disabled="disabled"
| style="width: 100%;"
| change-on-select
| @change="valueChange"/>
| </template>
| <script type="text/javascript">
| import arrayMixin from './arrayMixin'
| // import { productCategoryIndex } from '@/api/systemManagement/SystemCustomer'
|
| export default {
| name: 'XhProducCate', // 新建 产品分类
| components: {},
| mixins: [arrayMixin],
| props: {},
| data () {
| return {
| options: [],
| defaultProps: {
| children: 'children',
| label: 'label',
| value: 'categoryId'
| }
| }
| },
| computed: {},
| watch: {},
| mounted () {
| this.getProductCategoryIndex()
| },
| methods: {
| /** 获取产品分类数据 */
| getProductCategoryIndex () {
| // productCategoryIndex({
| // type: 'tree'
| // })
| // .then(res => {
| // this.options = res.data
| // })
| // .catch(() => {})
| },
|
| valueChange (val) {
| this.$emit('value-change', {
| index: this.index,
| item: this.item,
| value: val,
| valueContent: this.$refs.elCascader.currentLabels.join(',')
| })
| }
| }
| }
| </script>
| <style lang="less" scoped>
| </style>
|
|