| | |
| | | // } |
| | | // }) |
| | | }, |
| | | cateChange(node){ |
| | | cateChange (node) { |
| | | this.selectCate = node |
| | | }, |
| | | // 规范化选项数据的方法 |
| | |
| | | id: node.id, |
| | | label: node.name, |
| | | parentId: node.parentId, |
| | | children: node.childCategoryList, |
| | | children: node.childCategoryList |
| | | } |
| | | return node1 |
| | | }, |
| | |
| | | confirm () { |
| | | console.log('form', this.form.cateId) |
| | | const { form } = this |
| | | if(this.selectCate && this.selectCate.childCategoryList && this.selectCate.childCategoryList.length) { |
| | | if (this.selectCate && this.selectCate.childCategoryList && this.selectCate.childCategoryList.length) { |
| | | return Message.error('请选择二级分类') |
| | | } |
| | | this.$refs.form.validate((valid) => { |
| | |
| | | if (res && res.records && res.records.length > 0) { |
| | | res.records[0].fsStatus = 1 |
| | | this.cateList = res.records || [] |
| | | |
| | | } |
| | | }) |
| | | }, |