| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 模板克隆 --> |
| | | <el-dialog :visible.sync="CloneVisible" append-to-body title="克隆模板"> |
| | | <el-dialog :visible.sync="CloneVisible" append-to-body title="克隆模板" :before-close="cloneClose"> |
| | | <el-container> |
| | | <el-aside width="300px"> |
| | | <div style="margin-bottom: 5px"><el-tag>主题库分类</el-tag></div> |
| | | <!-- 克隆模板的树 沿用首页树的loading和option,但是data和v-model绑定的数据创建一个新的变量,另外点击方法也是重新获取来操作克隆模板的数据--> |
| | | <avue-tree v-model="TreeAvueform" v-loading="loading" :data="Treedata" |
| | | <avue-tree ref="cloneTree" v-model="TreeAvueform" v-loading="loading" :data="Treedata" |
| | | :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | style="height: 50.5vh;margin-right: 10px" |
| | |
| | | </el-container > |
| | | <div style="display: flex; justify-content: flex-end; align-items: center;margin-top: 10px" > |
| | | <el-button size="small " type="primary" @click="Clonehandler">确定</el-button> |
| | | <el-button size="small" @click="CloneVisible=false" >取消</el-button> |
| | | <el-button size="small" @click="cloneClose" >取消</el-button> |
| | | </div> |
| | | <el-dialog |
| | | width="30%" |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | //克隆取消 |
| | | cloneClose(){ |
| | | this.$refs.cloneTree.setCurrentKey(null) |
| | | this.ClonenodeClickList = {} |
| | | this.CloneFormlist=[] |
| | | this.CloneVisible=false; |
| | | }, |
| | | //克隆模板查询 |
| | | CloneEnterFind(){ |
| | | gridCodeClassifyTemplate().then(res => { |
| | |
| | | }, |
| | | //克隆模板单选框改变 |
| | | selectionChange(row) { |
| | | Object.assign(this.CloneModel, row[0]); |
| | | this.CloneSelect = [row[0]]; |
| | | this.CloneSelect = row; |
| | | const { id, name } = row[0]; |
| | | this.CloneModel = { id, name }; |
| | | this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid; |
| | | console.log('row',row) |
| | | console.log('CloneSelect',this.CloneSelect) |
| | | console.log('CloneModel',this.CloneModel) |
| | | }, |
| | | //克隆表单提交 |
| | | Clonesubmit(row, done) { |
| | | // 重新赋值CloneSelect传递的数据为输入框可以修改的数据,CloneModel提交表单输入框双向绑定数据 |
| | | Object.assign(this.CloneSelect[0], this.CloneModel); |
| | | // CloneSelect数组第一项 匹配CloneModel对象 |
| | | copy(this.CloneSelect[0]) |
| | | .then(() => { |
| | | // 因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。 |