田源
2023-07-04 8343c82dcfd2f1ce67e234a77af9ad4ae7a3533f
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -49,7 +49,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -65,7 +65,7 @@
        <!--        右侧表格-->
        <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
        <span v-if="type.prop==='tab1'">
           <classifyTreeform ref="childForm" :TreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform>
           <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'renonly'"></classifyTreeform>
        </span>
        <span v-else-if="type.prop==='tab2'">
            <basic-container>
@@ -433,14 +433,11 @@
  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,
@@ -460,11 +457,13 @@
          },
          {
            label:"版本号",
            prop:"revisionSeq"
            prop:"revisionSeq",
            display:false
          },
          {
            label:"状态",
            prop:"lcStatusText"
            prop:"lcStatusText",
            display:false
          }
        ]
      }
@@ -477,7 +476,6 @@
      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)
      })
@@ -601,7 +599,7 @@
          message: '请先从树上选择一条数据!'
        });
      } else {
        this.TreeEditFormVisible = true
        this.TreeEditFormVisible = true;
      }
    },
    //树刷新
@@ -675,7 +673,6 @@
    async nodeClick(data) {
      //定义一个模板属性id,数据是模板管理表格里面的oid
      this.nodeClickList = data
      console.log(data)
      this.ProData=[]
      try {
        await TreeObjcet(data.oid).then(res => {
@@ -692,7 +689,7 @@
            }
          })
        }).catch(res => {
          console.log(res)
          this.$message.error(res)
        })
        //  基本信息表单数据
        await getObjectByOid(this.nodeClickList.oid).then(res => {
@@ -701,13 +698,12 @@
          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 != "") {
@@ -795,8 +791,7 @@
          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",
@@ -811,6 +806,7 @@
          });
        })
      }
      console.log('123',this.codeClassifyOid)
    },
    //模板管理修改
    CrudRowUpdata(row,index,done) {
@@ -822,7 +818,7 @@
        });
        done()
      }).catch(res => {
        console.log(res)
        this.$message.error(res)
      })
    },
    //模板管理删除
@@ -838,7 +834,6 @@
    },
    //模板管理表格查询
    EnterFind() {
      console.log(this.Formlist)
      if (this.FindText == "") {
        gridCodeClassifyTemplate().then(res => {
          this.Formlist = res.data.data