|
@@ -43,7 +43,12 @@
|
|
|
>
|
|
|
<template #default="{ node, data }">
|
|
|
<span class="custom-tree-node">
|
|
|
- <span>{{ node.label }}</span>
|
|
|
+ <template v-if="node.level > 1">
|
|
|
+ <span class="__hover" @click.stop="onViewRule(data)">{{ node.label }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span>{{ node.label }}</span>
|
|
|
+ </template>
|
|
|
<span class="tree-buttons">
|
|
|
<template v-if="node.level > 1">
|
|
|
<div class="tree-button __hover" v-if="!data.enabled" @click.stop="onEditRule(data)">
|
|
@@ -296,6 +301,13 @@ const onAddRule = (row) => {
|
|
|
}
|
|
|
state.ruleDetail.show = true
|
|
|
}
|
|
|
+const onViewRule = (row) => {
|
|
|
+ state.ruleDetail.transfer = {
|
|
|
+ mode: 'view',
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ state.ruleDetail.show = true
|
|
|
+}
|
|
|
const onEditRule = (row) => {
|
|
|
state.ruleDetail.transfer = {
|
|
|
mode: 'edit',
|