田源
2023-08-04 48eac8e527776b318298b11b7651216ec68bdab1
主题库克隆模板改动
已修改2个文件
23 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -849,6 +849,7 @@
        this.$message.warning("只有状态为已发布的数据才能进行数据更改");
      } else {
        this.DataVisible = true;
        this.rowOid = this.selectRow[0]['oid']
      }
    },
    //增加保存
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -121,12 +121,12 @@
        </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"
@@ -160,7 +160,7 @@
                    </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%"
@@ -1361,6 +1361,13 @@
        });
      })
    },
    //克隆取消
    cloneClose(){
      this.$refs.cloneTree.setCurrentKey(null)
      this.ClonenodeClickList = {}
      this.CloneFormlist=[]
      this.CloneVisible=false;
    },
    //克隆模板查询
    CloneEnterFind(){
      gridCodeClassifyTemplate().then(res => {
@@ -1410,14 +1417,19 @@
    },
    //克隆模板单选框改变
    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两个弹窗。