| | |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧树 --> |
| | | <div style="height: calc(100vh - 200px);"> |
| | | <div style="height: calc(100vh - 195px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | <div> |
| | | <el-button icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">授权</el-button> |
| | | <el-button icon="el-icon-close" plain size="small" type="primary" @click="clearValue" style="margin-right: 40px;">重置</el-button> |
| | | 业务类型:<el-select v-model="type" placeholder="请选择" :clearable="true" @change="typeChange" style="width: 350px;margin-right: 20px;"> |
| | | 业务类型:<el-select v-model="type" placeholder="请选择" size="small" :clearable="true" @change="typeChange" style="width: 300px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in typeData" |
| | | :key="item.oid" |
| | |
| | | :value="item.attributes.name"> |
| | | </el-option> |
| | | </el-select> |
| | | UI上下文:<el-select v-model="context" placeholder="请选择" :clearable="true" @change="contextChange" style="width: 350px;"> |
| | | UI上下文:<el-select v-model="context" placeholder="请选择" size="small" :clearable="true" @change="contextChange" style="width: 350px;"> |
| | | <el-option |
| | | v-for="item in contextData" |
| | | :key="item.oid" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div style="height: calc(100vh - 277px);margin-top: 10px;"> |
| | | <div style="height: calc(100vh - 232px);margin-top: 10px;"> |
| | | <avue-tree ref="uiTree" :data="uiTreeData" :option="uiTreeOption"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | treeData: [], |
| | | defaultExpandKeys:[], |
| | | uiTreeOption: { |
| | | defaultExpandKeys:[], |
| | | defaultExpandedKeys:this.defaultExpandKeys, |
| | | multiple: true, |
| | | menu: false, |
| | | addBtn: false, |
| | |
| | | this.defaultExpandKeys=['root']; |
| | | getUIAuthor(params).then(res => { |
| | | this.processChildren(res.data.data[0]); // 处理每个节点 |
| | | this.uiTreeOption.defaultExpandKeys=this.defaultExpandKeys; |
| | | this.uiTreeOption.defaultExpandedKeys=this.defaultExpandKeys; |
| | | this.uiTreeData = [{ |
| | | attributes: {}, |
| | | checked: false, |
| | |
| | | processChildren(item) { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children = item.children.map(child => { |
| | | if(child.level<5){ |
| | | if(child.level<4){ |
| | | this.defaultExpandKeys.push(child.oid) |
| | | } |
| | | if(child.level==1){ |
| | |
| | | child.icon='el-icon-document'; |
| | | child.label=child.text |
| | | }else if(child.level==5){ |
| | | child.icon='el-icon-s-ticket'; |
| | | child.icon='el-icon-s-tools'; |
| | | child.label=child.text |
| | | } |
| | | this.processChildren(child); // 递归处理每个子节点 |