| | |
| | | @select="selectHandle" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button plain size="small" type="primary" @click="FindFormVisible = true;">查询</el-button> |
| | | <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="TreeEdit">修改</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button> |
| | |
| | | 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" |
| | | } |
| | | ] |
| | | }, |
| | | // //表格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" |
| | | // } |
| | | // ] |
| | | // }, |
| | | addFlag:false, |
| | | // 表格当前行id |
| | | crudOid:"", |
| | |
| | | mounted() { |
| | | this.type = this.tabOption.column[0]; |
| | | this.getAttr(); |
| | | console.log('11',this.nodeClickList) |
| | | }, |
| | | computed:{ |
| | | crudTreeOption(){ |
| | | return{ |
| | | index: true, |
| | | indexClassName:"序号", |
| | | indexLabelClassName:'序号', |
| | | border: true, |
| | | height:180, |
| | | selection:true, |
| | | addBtn:this.Formlist.length<=0 && this.nodeClickList != "", |
| | | column: [ |
| | | { |
| | | label: "模板编号", |
| | | prop: "id" |
| | | }, |
| | | { |
| | | label:"模板名称", |
| | | prop:"name" |
| | | }, |
| | | { |
| | | label: "模板描述", |
| | | prop:"description" |
| | | }, |
| | | { |
| | | label:"版本号", |
| | | prop:"revisionSeq" |
| | | }, |
| | | { |
| | | label:"状态", |
| | | prop:"lcStatusText" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //行单选事件 |
| | |
| | | async nodeClick(data) { |
| | | //定义一个模板属性id,数据是模板管理表格里面的oid |
| | | this.nodeClickList = data |
| | | console.log(data.oid) |
| | | console.log(data) |
| | | this.ProData=[] |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | // 查询 |
| | | FindeHanler(){ |
| | | if(this.nodeClickList != ""){ |
| | | this.FindFormVisible=true |
| | | }else { |
| | | this.$message.warning('请从树上选择一条数据') |
| | | } |
| | | }, |
| | | //克隆模板选择确定 |
| | | Clonehandler(){ |
| | | if(this.CloneSelect.length <= 0){ |