|
@@ -62,7 +62,7 @@ export default {
|
|
|
expands: []
|
|
|
}
|
|
|
},
|
|
|
- props: ['dataList'],
|
|
|
+ props: ['dataList', 'value2'],
|
|
|
computed: {},
|
|
|
watch: {
|
|
|
dataList(newVal, oldVal) {
|
|
@@ -74,6 +74,7 @@ export default {
|
|
|
mounted() {
|
|
|
this.initExpand()
|
|
|
this.$nextTick(() => this.doSelect())
|
|
|
+ console.log(this.value2)
|
|
|
},
|
|
|
methods: {
|
|
|
expandChange(row, expandedRows) {
|
|
@@ -84,8 +85,16 @@ export default {
|
|
|
},
|
|
|
initExpand() {
|
|
|
this.dataList.forEach(i => {
|
|
|
- if (i.children.some(c => c.isSatisfy == false)) this.expands.push(i.id)
|
|
|
+ if (this.value2) {
|
|
|
+ if (i.children.some(c => c.isSatisfy == false)) {
|
|
|
+ this.expands.push(i.id)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.expands.push(i.id)
|
|
|
+ }
|
|
|
+ // if (i.children.some(c => c.isSatisfy == false)) this.expands.push(i.id)
|
|
|
})
|
|
|
+ console.log('this.dataList', this.dataList)
|
|
|
},
|
|
|
doSelect() {
|
|
|
this.dataList.forEach(i => {
|