| | |
| | | <el-container> |
| | | <!-- 左侧菜单--> |
| | | <el-aside > |
| | | <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"@click.native="handleClickOutside" > |
| | | <div @click.native="handleClickOutside"> |
| | | <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"> |
| | | <div> |
| | | <div style="display: flex;justify-content: space-around"> |
| | | <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button> |
| | | <!-- <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button>--> |
| | | <!-- <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button>--> |
| | | <el-button plain size="small" type="primary" @click="flushed">刷新</el-button> |
| | | <div> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <div style="display: flex;"> |
| | | <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button> |
| | | <el-button plain size="small" type="primary" @click="flushed">刷新</el-button> |
| | | </div> |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <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="ImportExcel">导入</el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> |
| | | </div> |
| | |
| | | <el-form-item label="编码规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="业务类型:" label-width="150px" v-if="TreeFlag==false"> |
| | | <el-form-item label="业务类型:" label-width="150px" v-if="TreeFlagCode==false"> |
| | | <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" @focus="btmFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="关键属性查询规则:" label-width="150px"> |
| | |
| | | </el-dialog> |
| | | <!-- 修改对话框--> |
| | | <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类"> |
| | | <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag" ::nodeClickList="nodeClickList"></classifyTreeform> |
| | | <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" ::nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></classifyTreeform> |
| | | </el-dialog> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | | <basic-container> |
| | | <avue-crud v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption" |
| | | <avue-crud ref="textCrud" v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption" |
| | | @row-save="CrudRowSave" |
| | | @row-del="CrudRowDel" |
| | | @row-update="CrudRowUpdata" |
| | |
| | | <template slot="menuLeft"> |
| | | <el-button plain size="small" type="primary" @click="FindeHanler">查询</el-button> |
| | | <el-button plain size="small" type="primary" @click="TemRefresh">刷新</el-button> |
| | | <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> |
| | | <!-- 查询对话框--> |
| | | <el-dialog :visible.sync="FindFormVisible" append-to-body title="高级查询"> |
| | |
| | | <avue-crud v-model="ClonecrudForm" v-loading="FormLoing" :data="this.CloneFormlist" |
| | | :option="this.ClonecrudTreeOption" |
| | | @selection-change="selectionChange" |
| | | |
| | | ></avue-crud> |
| | | </div> |
| | | </el-main> |
| | |
| | | </el-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | <template #menu="{ size, row }"> |
| | | <template #menu="{ size, row ,index}"> |
| | | <el-button type="text" |
| | | v-if="row.lcStatus != 'Released'" |
| | | icon="el-icon-edit-outline " |
| | | :size="size" |
| | | @click="$refs.textCrud.rowEdit(row)">编辑</el-button> |
| | | <el-button type="text" |
| | | icon="el-icon-delete" |
| | | :size="size" |
| | | @click="$refs.textCrud.rowDel(row,index)">删除</el-button> |
| | | <el-button |
| | | v-show="row.lcStatus === 'Released'" |
| | | @click="upAndStopAndStart(row, 'upVersion')" |
| | |
| | | //使用inject接收参数 |
| | | //Treeoption左侧树新增表单项 Treedata左侧树节点 配置项 crudTreeOption右侧表格配置项 crudTreeData右侧表格显示内容 |
| | | //Treeform右侧表单配置项 |
| | | inject: [, "crudTreeData"], |
| | | inject: ["crudTreeData"], |
| | | data() { |
| | | return { |
| | | //树节点显示隐藏 |
| | | TreeFlag:false, |
| | | TreeFlagCode:false, |
| | | //编码规则 |
| | | MasterdialogVisible:false, |
| | | masterData:[], |
| | |
| | | funAPi: startRelease, |
| | | load: 'startReleaseLoad' |
| | | } |
| | | } |
| | | }, |
| | | //模板管理编辑 |
| | | showEditBtn:false, |
| | | } |
| | | }, |
| | | //tab栏默认是表格 |
| | |
| | | if (e.target.nodeName !== 'SPAN') { |
| | | this.$refs.tree.setCurrentKey(null) |
| | | this.nodeClickList = {} |
| | | this.TreeList=[] |
| | | this.TreeFlagCode=false; |
| | | } |
| | | }, true) |
| | | }, |
| | |
| | | height:180, |
| | | selection:true, |
| | | addBtn:this.Formlist.length<=0 && this.nodeClickList != "", |
| | | editBtn:false, |
| | | delBtn:false, |
| | | column: [ |
| | | { |
| | | label: "模板编号", |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //树节点失去焦点 |
| | | handleClickOutside(event) { |
| | | const treeElement = this.$refs.tree.$el; |
| | | const targetElement = event.target; |
| | | if (!treeElement.contains(targetElement)) { |
| | | // 在树组件外部点击,清空选择状态 |
| | | // this.nodeClickList=[]; |
| | | // this.CloneTreeAvueform={} |
| | | console.log(this.nodeClickList ) |
| | | console.log(this.CloneTreeAvueform) |
| | | } |
| | | }, |
| | | //模板管理已发布编辑 |
| | | // checkShowEditBtn() { |
| | | // this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released'); |
| | | // }, |
| | | //编码规则失焦 |
| | | CodeFoucus(){ |
| | | this.MasterdialogVisible=true; |
| | |
| | | }, |
| | | //修改回填 |
| | | TreeEdit() { |
| | | if (this.nodeClickList == "") { |
| | | if ( Object.keys(this.nodeClickList).length<1) { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请先从树上选择一条数据!' |
| | |
| | | //树点击事件 |
| | | async nodeClick(data) { |
| | | //定义一个模板属性id,数据是模板管理表格里面的oid |
| | | console.log('树',data) |
| | | if(data.parentId == ""){ |
| | | this.TreeFlag=true; |
| | | this.TreeFlagCode=true; |
| | | } |
| | | this.nodeClickList = data |
| | | this.ProData=[] |
| | |
| | | this.codeClassifyOid = item.codeclassifyoid |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | console.log('Formlist',this.Formlist) |
| | | }) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | // 基本信息表单数据 |
| | | await getObjectByOid(this.nodeClickList.oid).then(res => { |
| | | this.TreeList = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | await getObjectByOid(this.nodeClickList.oid).then(res => { |
| | | this.TreeList = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error(error) |
| | | } |
| | |
| | | treeClick(e) { |
| | | console.log(e); |
| | | }, |
| | | //基本信息表单刷新 |
| | | referTreeForm(){ |
| | | getObjectByOid(this.nodeClickList.oid).then(res => { |
| | | this.TreeList = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | //克隆模板树的点击切换数据 |
| | | async ClonenodeClick(data){ |
| | | this.ClonenodeClickList=data; |