| | |
| | | <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="ExportExcel">导出</el-button> |
| | | <el-button plain size="small" type="primary" @click="ImportExcel">导入</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;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> |
| | |
| | | <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="TreeEdit">修改</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">删除</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> |
| | |
| | | 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, |
| | |
| | | }, |
| | | { |
| | | label:"版本号", |
| | | prop:"revisionSeq" |
| | | prop:"revisionSeq", |
| | | display:false |
| | | }, |
| | | { |
| | | label:"状态", |
| | | prop:"lcStatusText" |
| | | prop:"lcStatusText", |
| | | display:false |
| | | } |
| | | ] |
| | | } |
| | |
| | | this.crudArray=selection; |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | |
| | | }, |
| | | //修改回填 |
| | | TreeEdit() { |
| | | // if (this.nodeClickList == "") { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: '请先从树上选择一条数据!' |
| | | // }); |
| | | // } else { |
| | | // this.TreeEditFormVisible = true; |
| | | // console.log('---',this.CloneTreedata) |
| | | // } |
| | | this.TreeEditFormVisible=true; |
| | | if (this.nodeClickList == "") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请先从树上选择一条数据!' |
| | | }); |
| | | } else { |
| | | this.TreeEditFormVisible = true; |
| | | } |
| | | }, |
| | | //树刷新 |
| | | flushed() { |
| | |
| | | async nodeClick(data) { |
| | | //定义一个模板属性id,数据是模板管理表格里面的oid |
| | | this.nodeClickList = data |
| | | console.log(data) |
| | | this.ProData=[] |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | |
| | | } |
| | | }) |
| | | }).catch(res => { |
| | | console.log(res) |
| | | this.$message.error(res) |
| | | }) |
| | | // 基本信息表单数据 |
| | | await getObjectByOid(this.nodeClickList.oid).then(res => { |
| | |
| | | this.$message.error(res) |
| | | }) |
| | | } catch (error) { |
| | | console.log(error) |
| | | this.$message.error(error) |
| | | } |
| | | }, |
| | | //克隆模板树的点击切换数据 |
| | | async ClonenodeClick(data){ |
| | | this.ClonenodeClickList=data; |
| | | console.log("aaa",this.ClonenodeClickList.oid) |
| | | await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{ |
| | | this.CloneFormlist = res.data.data.filter(item => { |
| | | if (item.codeclassifyoid != "") { |
| | |
| | | message: '请先从树上选择一条数据!' |
| | | }); |
| | | } else { |
| | | let codeClassifyOid = this.codeClassifyOid |
| | | this.$set(row, "codeclassifyoid", codeClassifyOid) |
| | | this.$set(row, "codeclassifyoid", this.nodeClickList.oid) |
| | | addSave(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }); |
| | | }) |
| | | } |
| | | console.log('123',this.codeClassifyOid) |
| | | }, |
| | | //模板管理修改 |
| | | CrudRowUpdata(row,index,done) { |
| | |
| | | }); |
| | | done() |
| | | }).catch(res => { |
| | | console.log(res) |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | //模板管理删除 |
| | |
| | | }, |
| | | //模板管理表格查询 |
| | | EnterFind() { |
| | | console.log(this.Formlist) |
| | | if (this.FindText == "") { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data |