| | |
| | | </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="TreeFlagCode" ::nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></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" |
| | |
| | | created() { |
| | | |
| | | }, |
| | | watch:{ |
| | | FormList:{ |
| | | handler(newval,oldval){ |
| | | console.log('FormList',newval) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | /** 导入 */ |
| | | ImportExcel(){ |
| | |
| | | this.crudOid=row.oid; |
| | | this.crudLCStatus=row.lcStatus; |
| | | this.crudArray.push(row); |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | this.gridCode() |
| | | }, |
| | | //分类树数据处理 |
| | | getAttr() { |
| | |
| | | if(this.Formlist.length >= 1){ |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | | this.crudOid=this.Formlist[this.selectRow].oid |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | this.crudOid=this.Formlist[this.selectRow].oid; |
| | | this.gridCode() |
| | | }else { |
| | | this.ProData = []; |
| | | } |
| | |
| | | } catch (error) { |
| | | this.$message.error(error) |
| | | } |
| | | }, |
| | | gridCode(){ |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | treeClick(e) { |
| | | console.log(e); |
| | |
| | | }, |
| | | //刷新 |
| | | TemRefresh() { |
| | | this.FormLoing = true |
| | | this.FormLoing = true; |
| | | if (this.nodeClickList.oid != "") { |
| | | gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': this.nodeClickList.oid}).then(res => { |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | }) |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | | }) |
| | | } else { |
| | | this.FormLoing = true |