|
@@ -144,20 +144,22 @@
|
|
|
</el-row>
|
|
|
<div>
|
|
|
<el-table
|
|
|
+ ref="moduleTable"
|
|
|
:data="moduleData"
|
|
|
style="width: 100%;margin-bottom: 20px;"
|
|
|
row-key="id"
|
|
|
border
|
|
|
:tree-props="{children: 'childModules', hasChildren: 'hasChildren'}"
|
|
|
+ :row-class-name="tableRowhidden"
|
|
|
>
|
|
|
<el-table-column v-if="false" prop="id" label="ID" width="180" />
|
|
|
<el-table-column prop="moduleName" label="模块名称" width="180">
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
+ <template slot="header">
|
|
|
模块名称<i class="el-icon-circle-plus" @click="handlerModule('add')" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="create" label="创建人" width="180" />
|
|
|
- <el-table-column prop="date" label="创建时间" />
|
|
|
+ <el-table-column prop="creator" label="创建人" width="180" />
|
|
|
+ <el-table-column prop="createTime" label="创建时间" />
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -492,10 +494,10 @@ export default {
|
|
|
this.treeData = res.data.map((item) => {
|
|
|
return { id: item.code, label: item.name }
|
|
|
})
|
|
|
- this.curcentTreeData = this.treeData[this.treeData.length - 1]
|
|
|
+ this.curcentTreeData = this.treeData[0]
|
|
|
this.getQueryBizModuleList(this.curcentTreeData.id)
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.tree.setCurrentKey(this.treeData[this.treeData.length - 1].id)
|
|
|
+ this.$refs.tree.setCurrentKey(this.treeData[0].id)
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({ message: res.msg, type: 'error' })
|
|
@@ -577,7 +579,12 @@ export default {
|
|
|
async getQueryBizModuleList(bizId) { // 获取结构化模块列表
|
|
|
const res = await queryBizModuleList(bizId)
|
|
|
this.moduleData = res.data
|
|
|
- console.log(this.moduleData)
|
|
|
+ },
|
|
|
+ tableRowhidden(row, index) { // 隐藏处理
|
|
|
+ if (row.row.isDelete === 1) {
|
|
|
+ return 'hidden-row'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
},
|
|
|
handlerModule(type, data, index) { // 模块处理
|
|
|
console.log(data)
|
|
@@ -665,6 +672,7 @@ export default {
|
|
|
const res = await deleteBizModule(form)
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ message: '删除成功', type: 'success' })
|
|
|
+ this.moduleData = []// 初始化
|
|
|
this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
|
|
|
this.moduleDialog = false
|
|
|
} else {
|
|
@@ -762,6 +770,10 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
}
|
|
|
+ .el-table .hidden-row {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
.el-popover {
|
|
|
min-width: 100px !important;
|
|
|
}
|