style: 格式化代码
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 100%" class="wrapper">
|
<div style="width: 100%" class="wrapper">
|
||||||
<el-input
|
<el-input
|
||||||
|
v-model="filterText"
|
||||||
placeholder="输入树状图体系"
|
placeholder="输入树状图体系"
|
||||||
v-model="filterText">
|
/>
|
||||||
</el-input>
|
|
||||||
<div class="tree">
|
<div class="tree">
|
||||||
<el-card style="height: 100%;padding-right: 120px;overflow-y:auto">
|
<el-card style="height: 100%;padding-right: 120px;overflow-y:auto">
|
||||||
<el-tree
|
<el-tree
|
||||||
@@ -16,34 +16,38 @@
|
|||||||
:data="treeList"
|
:data="treeList"
|
||||||
:default-expanded-keys="['64df1d5522bb49c09af6']"
|
:default-expanded-keys="['64df1d5522bb49c09af6']"
|
||||||
highlight-current
|
highlight-current
|
||||||
|
:filter-node-method="filterNode"
|
||||||
@node-click="treeClick"
|
@node-click="treeClick"
|
||||||
:filter-node-method="filterNode">
|
>
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
<span slot-scope="{ node, data }" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
||||||
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'"></span>
|
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'" />
|
||||||
<span style="font-size:12px"> {{ node.label }} </span>
|
<span style="font-size:12px"> {{ node.label }} </span>
|
||||||
<span>
|
<span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
v-show="data.show"
|
v-show="data.show"
|
||||||
v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
|
v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
|
||||||
@click="() => append(data)">
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="() => append(data)"
|
||||||
|
>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
v-show="data.show"
|
v-show="data.show"
|
||||||
v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
|
v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
|
||||||
@click="() => update(data)">
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="() => update(data)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
v-show="data.showDel"
|
v-show="data.showDel"
|
||||||
v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
|
v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
|
||||||
@click="() => remove(node, data)">
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="() => remove(node, data)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -51,14 +55,14 @@
|
|||||||
</el-tree>
|
</el-tree>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<addStructure ref="addStructureRef" @selectMenuList="selectMenuList"></addStructure>
|
<addStructure ref="addStructureRef" @selectMenuList="selectMenuList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import addStructure from "./addStructure";
|
import addStructure from './addStructure';
|
||||||
export default {
|
export default {
|
||||||
name: "policyTree",
|
name: 'PolicyTree',
|
||||||
components: {
|
components: {
|
||||||
addStructure
|
addStructure
|
||||||
},
|
},
|
||||||
@@ -72,14 +76,14 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.selectMenuList()
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
filterText (val) {
|
filterText (val) {
|
||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this.selectMenuList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectMenuList () {
|
selectMenuList () {
|
||||||
this.$http.get('sarResource/ts-resource/getListStand', {
|
this.$http.get('sarResource/ts-resource/getListStand', {
|
||||||
@@ -113,14 +117,14 @@ export default {
|
|||||||
roundButton: true,
|
roundButton: true,
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$http.put("sarResource/ts-resource/delResourceById", {
|
this.$http.put('sarResource/ts-resource/delResourceById', {
|
||||||
resourceId: data.id
|
resourceId: data.id
|
||||||
}, res => {
|
}, res => {
|
||||||
}, e => {
|
}, e => {
|
||||||
if(e.ok) {
|
if(e.ok) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: "删除成功"
|
message: '删除成功'
|
||||||
})
|
})
|
||||||
this.selectMenuList()
|
this.selectMenuList()
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
Reference in New Issue
Block a user