|
@@ -14,6 +14,8 @@
|
|
:filter-node-method="filterNode"
|
|
:filter-node-method="filterNode"
|
|
ref="tree"
|
|
ref="tree"
|
|
@node-click="handleNodeClick"
|
|
@node-click="handleNodeClick"
|
|
|
|
+ :current-node-key="ruleId"
|
|
|
|
+ :default-expanded-keys="[ruleId]"
|
|
>
|
|
>
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span :class="{'green': greenColorMenus.includes(data.id)}">{{ node.label }}</span>
|
|
<span :class="{'green': greenColorMenus.includes(data.id)}">{{ node.label }}</span>
|
|
@@ -793,6 +795,19 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.formInline.year = new Date().getFullYear().toString()
|
|
this.formInline.year = new Date().getFullYear().toString()
|
|
|
|
+ if (this.$route.path === '/embedIndex-home') {
|
|
|
|
+ this.ruleId = this.menus2[0].children[0].id
|
|
|
|
+ this.ruleName = this.menus2[0].children[0].name
|
|
|
|
+ } else {
|
|
|
|
+ if (this.$route.query.type === 'children') {
|
|
|
|
+ this.ruleId = this.cMenus[0].id
|
|
|
|
+ this.ruleName = this.cMenus[0].name
|
|
|
|
+ } else {
|
|
|
|
+ this.ruleId = this.menus[0].children[0].id
|
|
|
|
+ this.ruleName = this.menus[0].children[0].name
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
// 判断是取分子还是分母
|
|
// 判断是取分子还是分母
|
|
@@ -810,7 +825,7 @@ export default {
|
|
},
|
|
},
|
|
menuList() {
|
|
menuList() {
|
|
if (this.$route.path === '/embedIndex-home') {
|
|
if (this.$route.path === '/embedIndex-home') {
|
|
- return this.$route.path === '/embedIndex-home' ? this.menus2 : this.menus
|
|
|
|
|
|
+ return this.menus2
|
|
} else {
|
|
} else {
|
|
return this.$route.query.type === 'children' ? this.cMenus : this.menus
|
|
return this.$route.query.type === 'children' ? this.cMenus : this.menus
|
|
}
|
|
}
|
|
@@ -829,7 +844,6 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
onChangeValue(row) {
|
|
onChangeValue(row) {
|
|
- console.log(row, 9999)
|
|
|
|
if (row.time) {
|
|
if (row.time) {
|
|
// 单个修改
|
|
// 单个修改
|
|
const { time } = row
|
|
const { time } = row
|