| | |
| | | <el-form-item label="描述:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-show="this.TreeFlag==false" label="存储的业务类型:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.btmtypename" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="编码规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.coderuleoidName" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-dialog> |
| | | <!-- 修改对话框--> |
| | | <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类"> |
| | | <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'"></classifyTreeform> |
| | | <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}"></classifyTreeform> |
| | | </el-dialog> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | |
| | | <el-button plain size="small" type="primary" @click="Enable">启用</el-button> |
| | | <el-button plain size="small" type="primary" @click="Deactivate">停用</el-button> |
| | | <el-button plain size="small" type="primary" @click="CloneBtn">从其它模板克隆</el-button> |
| | | <!-- <div style="display: inline-block"> |
| | | <el-select v-model="searchTemplate.searchCondition" placeholder="请选择" class="search-condition"> |
| | | <el-option |
| | | v-for="item in searchTemplateOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-input v-model="searchTemplate.findText" placeholder="请输入关键字按回车查询" |
| | | size="small" |
| | | @keyup.enter.native="EnterFind"> |
| | | </el-input> |
| | | </div> --> |
| | | <!-- 查询对话框--> |
| | | <el-dialog :visible.sync="FindFormVisible" append-to-body title="高级查询"> |
| | | <div> |
| | |
| | | </el-container> |
| | | </template> |
| | | <script> |
| | | //这里声明一些菜单组件用法:首先布局分为左侧菜单右侧表格,可能会有右侧Tab栏加表单的情况。所以另外引入了一个右侧表单的组件"classifyTreeform"。 |
| | | //首先父组件调用子组件菜单,通过provide传递参数。有Treeoption左侧树新增表单项 Treedata左侧树节点配置项 crudTreeOption右侧表格配置项 crudTreeData右侧表格显示内容 |
| | | //其中表格的配置项直接父传子传递过来就行,直接:option=传递的参数名,里面数据显示的内容因为是和左侧联动的,所以重新一个Formlist,通过点击树节点下标来动态渲染右侧表格,下面方法都有具体注释 |
| | | //然后再说右侧的表单,专门定义了一个组件,通过父传子再把表单数据TreeList传递过去,传递前在10deCLi1ck方法里面便了处理也是一个联动的效果,表单的配置项在哪个子组件或者父组件写都可以。 |
| | | import { |
| | | getAtrrList, |
| | | TreeSave, |
| | |
| | | inject: [, "crudTreeData"], |
| | | data() { |
| | | return { |
| | | // //表格option配置项 |
| | | // crudTreeOption: { |
| | | // index: true, |
| | | // border: true, |
| | | // height:180, |
| | | // selection:true, |
| | | // addBtn:this.addFlag, |
| | | // column: [ |
| | | // { |
| | | // label: "模板编号", |
| | | // prop: "id" |
| | | // }, |
| | | // { |
| | | // label:"模板名称", |
| | | // prop:"name" |
| | | // }, |
| | | // { |
| | | // label: "模板描述", |
| | | // prop:"description" |
| | | // }, |
| | | // { |
| | | // label:"版本号", |
| | | // prop:"revisionSeq" |
| | | // }, |
| | | // { |
| | | // label:"状态", |
| | | // prop:"lcStatusText" |
| | | // } |
| | | // ] |
| | | // }, |
| | | // searchTemplateOptions: [ |
| | | // { |
| | | // value: 'id', |
| | | // label: '模板编号' |
| | | // }, { |
| | | // value: 'name', |
| | | // label: '模板名称' |
| | | // } |
| | | // ], |
| | | addFlag:false, |
| | | // 表格当前行id |
| | | crudOid:"", |
| | |
| | | searchCondition: 'id', |
| | | findText: "", |
| | | }, |
| | | |
| | | |
| | | //高级查询对话框 |
| | | FindFormVisible: false, |
| | | //克隆模板对话框 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | MasterHandler(val){ |
| | | console.log('父亲',val) |
| | | this.TreeList=val |
| | | }, |
| | | //行单选事件 |
| | | selectHandle(selection,row){ |
| | | this.crudOid=row.oid; |