|
@ -78,6 +78,7 @@ import listBrowsing from './listBrowsing/index' |
|
|
import orderingRule from './orderingRule/index' |
|
|
import orderingRule from './orderingRule/index' |
|
|
import fileNoFormat from './fileNoFormat/index' |
|
|
import fileNoFormat from './fileNoFormat/index' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
|
|
import Vue from 'vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'Category', |
|
|
name: 'Category', |
|
@ -137,15 +138,6 @@ export default { |
|
|
} |
|
|
} |
|
|
return 'baseInfo' |
|
|
return 'baseInfo' |
|
|
} |
|
|
} |
|
|
// , |
|
|
|
|
|
// brotherNodeNum: function() { |
|
|
|
|
|
// const selectedNode = this.$refs.tree.getCurrentNode() |
|
|
|
|
|
// if (selectedNode && selectedNode.pid && this.$refs.tree.getNode(selectedNode.pid)) { |
|
|
|
|
|
// return this.$refs.tree.getNode(selectedNode.pid).childNodes.length |
|
|
|
|
|
// } else { |
|
|
|
|
|
// return 0 |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 逆归实现 获取指定元素 |
|
|
// 逆归实现 获取指定元素 |
|
@ -197,12 +189,14 @@ export default { |
|
|
this.crud.selectionChangeHandler([val]) |
|
|
this.crud.selectionChangeHandler([val]) |
|
|
this.$refs.eform.pid = val.id |
|
|
this.$refs.eform.pid = val.id |
|
|
this.selectedCategory = val |
|
|
this.selectedCategory = val |
|
|
|
|
|
if (val.pid !== '0') { |
|
|
|
|
|
Vue.set(this.selectedCategory, 'parentName', this.$refs.tree.getNode(val.pid).data.cnName) |
|
|
|
|
|
} |
|
|
if (val.isType === 1) { |
|
|
if (val.isType === 1) { |
|
|
this.changeActiveTab(0) |
|
|
this.changeActiveTab(0) |
|
|
} |
|
|
} |
|
|
// 缓存当前的选中的 |
|
|
// 缓存当前的选中的 |
|
|
localStorage.setItem('currentCategoryKey', JSON.stringify(val)) |
|
|
localStorage.setItem('currentCategoryKey', JSON.stringify(val)) |
|
|
this.brotherNodeNum = val.pid |
|
|
|
|
|
if (this.$refs.tree.getNode(val.pid) && this.$refs.tree.getNode(val.pid).childNodes) { |
|
|
if (this.$refs.tree.getNode(val.pid) && this.$refs.tree.getNode(val.pid).childNodes) { |
|
|
this.brotherNodeNum = this.$refs.tree.getNode(val.pid).childNodes.length |
|
|
this.brotherNodeNum = this.$refs.tree.getNode(val.pid).childNodes.length |
|
|
} |
|
|
} |
|
|