| | |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="15.7%"> |
| | | <el-aside style="width:333px;"> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">创建 |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 创建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">修改 |
| | | <el-button v-if="permissionList.editBtn" class="button-custom-icon" plain size="small" type="primary" @click="editClickHandler"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | 修改 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">删除 |
| | | <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" @click="delClickHandler"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出 |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" @click="uploadClickHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导入 |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导入 |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">查看使用范围 |
| | | <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small" type="primary" @click="checkViewClickHandler"> |
| | | <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show> |
| | | 查看使用范围 |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧树 --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <avue-tree ref="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> |
| | |
| | | import CycleFlow from "@/components/flow-cycle/flowchartEditor.vue"; |
| | | import func from "@/util/func"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | searchMenuSpan: 8, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | header:false, |
| | | column: [ |
| | | { |
| | | label: '名称', |
| | |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | 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), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].SEARCH, false), |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.createdHandler(); |
| | |
| | | addClickHandler() { |
| | | this.$store.dispatch('updateMethodBtn', true); |
| | | this.handleResetTree(); |
| | | this.$store.dispatch('typeChange', 'add'); |
| | | }, |
| | | |
| | | // 修改按钮 |
| | |
| | | return; |
| | | } |
| | | this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0); |
| | | this.$store.dispatch('editNodesStatus', true); |
| | | this.$store.dispatch('typeChange', 'edit'); |
| | | }, |
| | | |
| | | // 删除按钮 |
| | |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewData.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | |
| | | startStatus: params.startStatus, |
| | | startStatusName: params.startStatusName, |
| | | description: params.description, |
| | | ts:params.ts, |
| | | oid:params.oid, |
| | | bounds: params.nodes.map(node => ({ |
| | | name: node.id, |
| | | cellx: String(node.x), |
| | |
| | | : () => addLifeCycle(transformedData); |
| | | |
| | | getFunction().then(res => { |
| | | console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.createdHandler(); |
| | | // this.handleResetTree(); |
| | | this.rowData = {}; |
| | | this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0); |
| | | } |
| | | }); |
| | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button { |
| | | width: 65px; |
| | | padding-left: 9.5px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | //.headerCon > .el-button:nth-child(6) { |
| | | // margin-left: 0; |
| | | //} |
| | | |
| | | .smallBtn { |
| | | width: 77px !important; |
| | | //font-size: 11px !important; |
| | | text-align: center !important; |
| | | padding-left: 1px !important; |
| | | } |
| | | |
| | | </style> |
| | | |