|
@@ -32,12 +32,11 @@
|
|
|
@check="onCheck"
|
|
|
@expand="onExpand"
|
|
|
:expandedKeys="expandedKeys"
|
|
|
- :defaultExpandAll="true"
|
|
|
:autoExpandParent="autoExpandParent"
|
|
|
v-model="checkedKeys"
|
|
|
:treeData="treeData"
|
|
|
>
|
|
|
- <!-- <a-icon v-if="authType == 0" slot="switcherIcon" type="file" /> -->
|
|
|
+ <a-icon v-if="authType == 0" slot="switcherIcon" type="file" />
|
|
|
</a-tree>
|
|
|
</div>
|
|
|
<a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;margin: 18px 0 0;">
|
|
@@ -103,7 +102,9 @@ export default {
|
|
|
methods: {
|
|
|
// 展开/收起节点
|
|
|
onExpand (expandedKeys) {
|
|
|
+ console.log(expandedKeys)
|
|
|
this.expandedKeys = expandedKeys
|
|
|
+ // this.autoExpandParent = false
|
|
|
},
|
|
|
// 点击复选框
|
|
|
onCheck (checkedKeys, info) {
|
|
@@ -319,24 +320,24 @@ export default {
|
|
|
this.findPrice(treeData, this.checkedData)
|
|
|
this.hasAllSelect()
|
|
|
}
|
|
|
- console.log(this.checkedKeys)
|
|
|
- console.log(this.checkedData)
|
|
|
+ // console.log(this.checkedKeys)
|
|
|
+ // console.log(this.checkedData)
|
|
|
|
|
|
this.treeData = treeData
|
|
|
|
|
|
- // if (this.authType == 0) {
|
|
|
- // let leafNodes = []
|
|
|
- // setTimeout(() => {
|
|
|
- // if (leafNodes.length == 0) {
|
|
|
- // leafNodes = document.querySelectorAll('ul > li.leafNode:first-child')
|
|
|
- // for (let i = 0; i < leafNodes.length; i++) {
|
|
|
- // const cn = leafNodes[i].parentNode.className
|
|
|
- // leafNodes[i].parentNode.className += cn.indexOf('leafParent') < 0 ? ' leafParent' : ''
|
|
|
- // leafNodes[i].parentNode.parentNode.style.padding = '6px 0'
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }, 100)
|
|
|
- // }
|
|
|
+ if (this.authType == 0) {
|
|
|
+ let leafNodes = []
|
|
|
+ setTimeout(() => {
|
|
|
+ if (leafNodes.length == 0) {
|
|
|
+ leafNodes = document.querySelectorAll('ul > li.leafNode:first-child')
|
|
|
+ for (let i = 0; i < leafNodes.length; i++) {
|
|
|
+ const cn = leafNodes[i].parentNode.className
|
|
|
+ leafNodes[i].parentNode.className += cn.indexOf('leafParent') < 0 ? ' leafParent' : ''
|
|
|
+ leafNodes[i].parentNode.parentNode.style.padding = '6px 0'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -358,6 +359,14 @@ export default {
|
|
|
} else {
|
|
|
this.priceOptions = this.$store.state.app.priceAuthOptions
|
|
|
}
|
|
|
+ },
|
|
|
+ nowData: {
|
|
|
+ handler (newValue, oldValue) {
|
|
|
+ if (this.isshow && newValue) {
|
|
|
+ this.pageInit()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
}
|
|
|
}
|
|
|
}
|