|
@@ -52,13 +52,15 @@
|
|
<!-- 分模块展示功能项 -->
|
|
<!-- 分模块展示功能项 -->
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<ul>
|
|
<ul>
|
|
- <li v-for="mainMenu in moduleList" :key="mainMenu.id">
|
|
|
|
|
|
+ <li v-for="mainMenu in moduleList" :key="mainMenu.id" style="display: flex;">
|
|
<div style="width: 20px; display: inline-block;height: 10px">
|
|
<div style="width: 20px; display: inline-block;height: 10px">
|
|
<span v-if="mainMenu.children.length > 0" @click="dianji(mainMenu)" style="cursor:pointer;"><i :class="mainMenu.useState ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"></i></span>
|
|
<span v-if="mainMenu.children.length > 0" @click="dianji(mainMenu)" style="cursor:pointer;"><i :class="mainMenu.useState ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"></i></span>
|
|
</div>
|
|
</div>
|
|
<el-checkbox :label="mainMenu.name" name="type" v-model="mainMenu.checked" style="font-weight:bold;" @change="mainChange(mainMenu)"></el-checkbox>
|
|
<el-checkbox :label="mainMenu.name" name="type" v-model="mainMenu.checked" style="font-weight:bold;" @change="mainChange(mainMenu)"></el-checkbox>
|
|
- <span v-if="mainMenu.functionList && mainMenu.functionList.length > 0" style="margin-right:10px;margin-left:10px;">(功能:
|
|
|
|
- <el-checkbox v-for="fun in mainMenu.functionList" :key="fun.id" :label="fun.name" name="type" v-model="fun.checked" @change="subChanges(fun, mainMenu.id)"></el-checkbox>)</span>
|
|
|
|
|
|
+ <span v-if="mainMenu.functionList && mainMenu.functionList.length > 0" style="margin-right:10px;margin-left:10px;">
|
|
|
|
+ <!-- <div></div>(功能: <el-checkbox v-for="fun in mainMenu.functionList" :key="fun.id" :label="fun.name" name="type" v-model="fun.checked" @change="subChanges(fun, mainMenu.id)"></el-checkbox>) -->
|
|
|
|
+ <span class="gongn">(功能: <el-checkbox v-for="fun in mainMenu.functionList" :key="fun.id" :label="fun.name" name="type" v-model="fun.checked"></el-checkbox>)</span>
|
|
|
|
+ </span>
|
|
<ul v-if="mainMenu.children && mainMenu.useState">
|
|
<ul v-if="mainMenu.children && mainMenu.useState">
|
|
<li v-for="subMenu in mainMenu.children" :key="subMenu.id">
|
|
<li v-for="subMenu in mainMenu.children" :key="subMenu.id">
|
|
<el-checkbox :label="subMenu.name" name="type" v-model="subMenu.checked" style="font-weight:bold;" @change="subChange(subMenu)"></el-checkbox>
|
|
<el-checkbox :label="subMenu.name" name="type" v-model="subMenu.checked" style="font-weight:bold;" @change="subChange(subMenu)"></el-checkbox>
|
|
@@ -292,11 +294,11 @@ export default {
|
|
f.checked = mainMenu.checked;
|
|
f.checked = mainMenu.checked;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- if(mainMenu.functionList) {
|
|
|
|
- mainMenu.functionList.forEach(c=>{
|
|
|
|
- c.checked = mainMenu.checked;
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // if(mainMenu.functionList) {
|
|
|
|
+ // mainMenu.functionList.forEach(c=>{
|
|
|
|
+ // c.checked = mainMenu.checked;
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
subChange(subMenu) {
|
|
subChange(subMenu) {
|
|
//二级选中,自动勾选对应的一级
|
|
//二级选中,自动勾选对应的一级
|
|
@@ -392,4 +394,8 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
overflow: auto;
|
|
overflow: auto;
|
|
}
|
|
}
|
|
|
|
+ .gongn {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 550px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|