|
@@ -92,7 +92,7 @@
|
|
|
<div class="two-hao module">
|
|
|
<el-container style="height:calc(100vh - 140px);">
|
|
|
<el-aside class="aside">
|
|
|
- <label class="tab-line">业务线<i class="el-icon-circle-plus" @click="handlerNodeTree('add');dialogTitle='新增业务线'" /></label>
|
|
|
+ <label class="tab-line" style="margin-bottom:10px">业务线<i class="el-icon-circle-plus" @click="handlerNodeTree('add');dialogTitle='新增业务线'" /></label>
|
|
|
<el-tree
|
|
|
ref="tree"
|
|
|
node-key="id"
|
|
@@ -103,6 +103,7 @@
|
|
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
|
|
<span>{{ node.label }}</span>
|
|
|
<el-popover
|
|
|
+ ref="popover"
|
|
|
trigger="click"
|
|
|
placement="bottom"
|
|
|
>
|
|
@@ -150,8 +151,10 @@
|
|
|
row-key="id"
|
|
|
border
|
|
|
:tree-props="{children: 'childModules', hasChildren: 'hasChildren'}"
|
|
|
- :row-class-name="tableRowhidden"
|
|
|
header-align="center"
|
|
|
+ size="mini"
|
|
|
+ :header-cell-style="{ background: '#F2F3F6' }"
|
|
|
+ fit
|
|
|
>
|
|
|
<el-table-column v-if="false" prop="id" label="ID" width="180" align="center" />
|
|
|
<el-table-column prop="moduleName" label="模块名称">
|
|
@@ -159,20 +162,25 @@
|
|
|
模块名称<i class="el-icon-circle-plus" @click="handlerModule('add')" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="creator" label="创建人" width="120" align="center" />
|
|
|
- <el-table-column prop="createTime" label="创建时间" width="180" align="center" />
|
|
|
+ <el-table-column prop="creator" label="创建人" width="150" align="center" />
|
|
|
+ <el-table-column prop="createTime" label="创建时间" width="150" align="center" />
|
|
|
<el-table-column label="操作" width="240" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
+ plain
|
|
|
@click="handlerModule('add', scope.row, scope.$index)"
|
|
|
>添加</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
+ plain
|
|
|
+ type="primary"
|
|
|
@click="handlerModule('edit', scope.row, scope.$index)"
|
|
|
>编辑</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
+ plain
|
|
|
+ type="danger"
|
|
|
@click="handlerModule('delete', scope.row, scope.$index)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
@@ -545,8 +553,6 @@ export default {
|
|
|
this.$message({ message: '添加成功', type: 'success' })
|
|
|
this.getBiz_list()
|
|
|
this.showDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
},
|
|
|
async editNodeTree(nodeForm) { // 编辑业务线
|
|
@@ -555,8 +561,6 @@ export default {
|
|
|
this.$message({ message: '修改成功', type: 'success' })
|
|
|
this.getBiz_list()
|
|
|
this.showDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
},
|
|
|
async deteleNodeTree(nodeForm) { // 删除业务线
|
|
@@ -565,8 +569,6 @@ export default {
|
|
|
this.$message({ message: '删除成功', type: 'success' })
|
|
|
this.getBiz_list()
|
|
|
this.showDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
},
|
|
|
handleNodeClick(data) { // 选择业务线
|
|
@@ -578,13 +580,17 @@ export default {
|
|
|
},
|
|
|
async getQueryBizModuleList(bizId) { // 获取结构化模块列表
|
|
|
const res = await queryBizModuleList(bizId)
|
|
|
- this.moduleData = res.data
|
|
|
+ this.moduleData = this.handleData(res.data)
|
|
|
},
|
|
|
- tableRowhidden(row, index) { // 隐藏处理
|
|
|
- if (row.row.isDelete === 1) {
|
|
|
- return 'hidden-row'
|
|
|
+ handleData(arr) {
|
|
|
+ if (arr.length === 0) return
|
|
|
+ const newArr = arr.filter(item => {
|
|
|
+ return item.isDelete !== 1
|
|
|
+ })
|
|
|
+ for (let i = 0; i < newArr.length; i++) {
|
|
|
+ newArr[i].childModules = this.handleData(newArr[i].childModules)
|
|
|
}
|
|
|
- return ''
|
|
|
+ return newArr
|
|
|
},
|
|
|
handlerModule(type, data, index) { // 模块处理
|
|
|
console.log(data)
|
|
@@ -592,6 +598,7 @@ export default {
|
|
|
this.curcentModule = type
|
|
|
this.moduleForm = { bizId: null, moduleNames: [null], parentId: -1, id: null }// 初始化
|
|
|
this.curcentParent = '无'
|
|
|
+ this.moduleTitle = '新增模块'
|
|
|
if (data && type === 'add') {
|
|
|
this.moduleTitle = '新增模块'
|
|
|
this.curcentParent = data.moduleName
|
|
@@ -647,8 +654,6 @@ export default {
|
|
|
this.$message({ message: '添加成功', type: 'success' })
|
|
|
this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
|
|
|
this.moduleDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
},
|
|
|
async updataModule(moduleForm) { // 更新模块
|
|
@@ -663,8 +668,6 @@ export default {
|
|
|
this.$message({ message: '更新成功', type: 'success' })
|
|
|
this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
|
|
|
this.moduleDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
},
|
|
|
async deleteModule(moduleForm) { // 删除模块
|
|
@@ -677,14 +680,12 @@ export default {
|
|
|
this.moduleData = []// 初始化
|
|
|
this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
|
|
|
this.moduleDialog = false
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error' })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
.set-background{
|
|
|
background-color: #F2F3F6;
|
|
|
min-width: 900px;
|
|
@@ -712,7 +713,9 @@ export default {
|
|
|
overflow: auto;
|
|
|
border-radius:4px;
|
|
|
background-color: white;
|
|
|
+ padding-left:20px;
|
|
|
.tab-line {
|
|
|
+ font-size: 14px;
|
|
|
width: 100%;
|
|
|
display: inline-block;
|
|
|
padding-left: 15%;
|
|
@@ -728,14 +731,19 @@ export default {
|
|
|
}
|
|
|
.el-tree-node:hover .icon-display{
|
|
|
display: inline-block;
|
|
|
+ color: #909399
|
|
|
}
|
|
|
.is-current {
|
|
|
color: rgb(64, 158, 255);
|
|
|
background-color: #f0f7ff;
|
|
|
+ .icon-display{
|
|
|
+ color: rgb(64, 158, 255) !important;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.module {
|
|
|
background-color: #F2F3F6;
|
|
|
+ padding-left:0px;
|
|
|
}
|
|
|
}
|
|
|
.aside{
|
|
@@ -750,7 +758,7 @@ export default {
|
|
|
.combine-table{
|
|
|
background-color: white;
|
|
|
border-radius: 4px;
|
|
|
- width: 82.7%;
|
|
|
+ width: 90%;
|
|
|
margin: 0 0 10px 10px;
|
|
|
flex: 0 1 auto !important;
|
|
|
i {
|
|
@@ -764,38 +772,19 @@ export default {
|
|
|
}
|
|
|
.table-title {
|
|
|
color: #606266;
|
|
|
- font-size: 20px;
|
|
|
+ font-size: 16px;
|
|
|
font-weight: bold;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
.table-id {
|
|
|
color: #909399;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 12px;
|
|
|
}
|
|
|
.el-col {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
}
|
|
|
- .el-table .hidden-row {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- .el-popover {
|
|
|
- min-width: 50px !important;
|
|
|
- padding: 0;
|
|
|
- width: 50px;
|
|
|
- .edit-cancel {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- button {
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // .edit-cancel {
|
|
|
- // display: flex;
|
|
|
- // justify-content: space-around;
|
|
|
- // }
|
|
|
.custom-tree-node {
|
|
|
flex: 1;
|
|
|
display: flex;
|
|
@@ -819,3 +808,18 @@ export default {
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|
|
|
+<style lang="scss">
|
|
|
+ .el-popover {
|
|
|
+ min-width: 50px;
|
|
|
+ padding: 0;
|
|
|
+ width: 50px;
|
|
|
+ .edit-cancel {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ button {
|
|
|
+ margin: 0;
|
|
|
+ color: #909399
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|