| | |
| | | <template> |
| | | <el-container> |
| | | <el-header> |
| | | <el-button type="primary" @click="businessAdd">新增</el-button> |
| | | <el-button type="primary" @click="businessEdit">修改</el-button> |
| | | <el-button type="primary" @click="selectFromTable">从已有中获取</el-button> |
| | | <el-header class="businessHeader" style="height: 40px;"> |
| | | <el-button type="primary" @click="businessAdd" size="small">新增</el-button> |
| | | <el-button type="primary" @click="businessEdit" size="small">修改</el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small">从已有中获取</el-button> |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside width="240px"> |
| | | <basic-container> |
| | | <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick" class="businessTree"> |
| | | <span class="el-tree-node__label" slot-scope="{ node, data }"> |
| | | <span> |
| | | <i class="el-icon-star-on"></i> |
| | |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.key"></i> |
| | | <i class="el-icon-finished"></i> |
| | | 英文名称 |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | <i class="el-icon-info"></i> |
| | | 中文名称 |
| | | </template> |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.tableName"></i> |
| | | <i class="el-icon-date"></i> |
| | | 数据库表名 |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | <i class="el-icon-folder-opened"></i> |
| | | 所属领域 |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.revisionRule"></i> |
| | | <i class="el-icon-s-check"></i> |
| | | 版本规则 |
| | | </template> |
| | | {{ obj.versionRule }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.lifeCycle"></i> |
| | | <i class="el-icon-refresh-right"></i> |
| | | 生命周期 |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.view"></i> |
| | | <i class="el-icon-view"></i> |
| | | 视图 |
| | | </template> |
| | | <el-tag size="small"> |
| | |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | <i class="el-icon-chat-line-square"></i> |
| | | 描述 |
| | | </template> |
| | | {{ obj.description }} |
| | |
| | | </el-main> |
| | | <el-dialog :visible="ref.visible" title="从数据库中添加" width="700px" append-to-body @close="dialoghandelfalse"> |
| | | 选择领域: |
| | | <el-select v-model="domain" placeholder="请选择" @change="refOnLoad"> |
| | | <el-select v-model="domain" placeholder="请选择" @change="refOnLoad" size="small"> |
| | | <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <div class="sep" style="height:7px"> |
| | | |
| | | </div> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandeltrue">确定</el-button> |
| | | <el-button @click="dialoghandelfalse">取消</el-button> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandelfalse">取 消</el-button> |
| | | <el-button type="primary" @click="dialoghandeltrue">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-container> |
| | |
| | | border: true, |
| | | height: 466, |
| | | editBtn: false, |
| | | index: true, |
| | | rowKey:'oid', |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | |
| | | headerAlign: 'center', |
| | | border: true, |
| | | index: true, |
| | | rowKey: 'oid', |
| | | rowKey: 'id', |
| | | tabs: true, |
| | | addBtn: false, |
| | | menu: false, |
| | |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | if(data.oid){ |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | } |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }, |
| | | // 基本信息添加 |
| | | basicSave(row, done, loading) { |
| | | add(Object.assign({ |
| | | createUser: this.userInfo.name |
| | | }, row)).then(() => { |
| | | this.$message.success('新增成功') |
| | | done(); |
| | | this.getList(); |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | }, |
| | | //属性添加 |
| | | loadSave(row, done, loading) { |
| | | add(Object.assign({ |
| | | createUser: this.userInfo.name |
| | | }, row)).then(() => { |
| | | this.$message.success('新增成功') |
| | | done(); |
| | | this.getList(); |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | }, |
| | | selectFromTable() { |
| | | console.log('获取'); |
| | | this.ref.visible = true; |
| | | }, |
| | | refOnLoad(domain) { |
| | |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | ifRefreshBtmAddRefresh(){ |
| | | this.$refs.btmAdd.refreshAttrTable(); |
| | | // this.$refs.btmAdd.refreshAttrTable(); |
| | | } |
| | | }, |
| | | } |
| | |
| | | .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | } |
| | | .businessTreeContainer > .el-card > .el-card__body { |
| | | height: 775px; |
| | | } |
| | | </style> |