This commit is contained in:
张成
2025-11-06 13:56:53 +08:00
parent b02853d5f7
commit c734e698de
12 changed files with 742 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
<div class="content-view ">
<div class="tree-box">
<div class="btn-top-box pa10">
<Button type="warning" size="small" @click="delAll">全部删除</Button>
<Button type="warning" size="small" @click="delAll">全部删除2</Button>
</div>
<Tree class="mt10" :data="treeData" :render="renderContent" @on-select-change="selectChange"></Tree>
</div>
@@ -83,25 +83,33 @@ export default {
}
}),
h('span', data.title),
h('Icon', {
props: {
type: 'ios-trash',
size: '18'
},
h('span', {
on: {
click: () => {
click: (e) => {
e.stopPropagation() // 阻止事件冒泡
e.preventDefault() // 阻止默认行为
this.deleteLog(data)
}
},
style: {
'margin-left': '8px'
'margin-left': '8px',
cursor: 'pointer',
display: 'inline-block'
}
})
}, [
h('Icon', {
props: {
type: 'ios-trash',
size: '18'
}
})
])
])
]
)
},
async selectChange(row) {
row[0].selected = true
this.selectRow = row[0].title
let res = await sys_log_serve.detail({ title: this.selectRow })
@@ -135,7 +143,7 @@ export default {
.content-view {
display: flex;
flex-direction: row;
.tree-box {
.log-box {
height: 90vh;
width: 300px;
border-right: solid 1px #ccc;

View File

@@ -4,9 +4,7 @@
<Button type="primary" @click="addWarp()">新增</Button>
</div>
<div class="table-body">
<card class="tree-box">
<TreeGrid :columns="gridOption.columns" :data="gridOption.data"></TreeGrid>
</card>
</div>
<editModal ref="editModal" :columns="gridOption.editColumns" :rules="gridOption.rules">
<div slot="bottom">
@@ -254,7 +252,7 @@ export default {
this.gridOption.menuData = this.mapTree(menuTree)
this.$store.dispatch('setAuthorityMenus')
},
async initCol() {
let res = await menuServer.modelAll()
@@ -394,9 +392,5 @@ export default {
</script>
<style>
.tree-box {
overflow: auto;
height: 100%;
max-height: calc(100vh - 200px);
}
</style>