| | |
| | | import catalogEdit from './catalogEdit.vue' |
| | | export default { |
| | | name: 'chooseChannelForCatalog', |
| | | props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange'], |
| | | props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange', 'treeType'], |
| | | created() { |
| | | this.chooseId = this.defaultCatalogId; |
| | | this.defaultCatalogIdSign = this.defaultCatalogId; |
| | |
| | | platformId: that.platformId, |
| | | parentId: parentId |
| | | } |
| | | }) |
| | | .then((res)=> { |
| | | }).then((res)=> { |
| | | if (res.data.code === 0) { |
| | | if (typeof(callback) === 'function') { |
| | | callback(res.data.data) |
| | |
| | | }, |
| | | addCatalog: function (parentId, node){ |
| | | let that = this; |
| | | console.log(this.treeType) |
| | | // 打开添加弹窗 |
| | | that.$refs.catalogEdit.openDialog(false, null, null, parentId, ()=>{ |
| | | that.$refs.catalogEdit.openDialog(false, null, null, parentId, this.treeType, node.level, ()=>{ |
| | | node.loaded = false |
| | | node.expand(); |
| | | }); |
| | |
| | | id: id, |
| | | platformId: this.platformId, |
| | | } |
| | | }) |
| | | .then((res) => { |
| | | }).then((res) => { |
| | | if (res.data.code === 0) { |
| | | console.log("移除成功") |
| | | node.parent.loaded = false |
| | |
| | | platformId: this.platformId, |
| | | catalogId: id, |
| | | } |
| | | }) |
| | | .then((res)=> { |
| | | }).then((res)=> { |
| | | if (res.data.code === 0) { |
| | | this.defaultCatalogIdSign = id; |
| | | } |