| | |
| | | <!--类型Action--> |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <basic-container v-loadng="treeLoading"> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧树 --> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <span> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">添加</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">移除</el-button> |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="addHandler">添加</el-button> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">移除</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <action-dialog ref="actionDialog" :is-muti="true" @updataAction="actionSaveHandler"></action-dialog> |
| | |
| | | import {getTypeActionByType,savePLTypeAction,delPLTypeActions} from "@/api/authority/ui/typeAction" |
| | | import func from "@/util/func"; |
| | | import actionDialog from "@/views/modelingMenu/ui/Aciton/components/dialog" |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components:{actionDialog}, |
| | | data() { |
| | | return { |
| | | treeLoading:false, |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: true, |
| | |
| | | data: [], |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | methods: { |
| | | //树表查询 |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | this.treeLoading = true; |
| | | getBizTree().then(res => { |
| | | this.treeData = [res.data.obj]; |
| | | loading.close(); |
| | | this.treeLoading = false; |
| | | }).catch(error => { |
| | | loading.close(); |
| | | this.treeLoading = false; |
| | | }) |
| | | }, |
| | | // 树点击 |