田源
2023-07-31 3d1944bf7d0f33511dfe72c5099727dad6cc602b
主题库模板管理升版bug
已修改1个文件
73 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -58,7 +58,7 @@
        </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"
@@ -730,6 +730,13 @@
  created() {
  },
  watch:{
    FormList:{
      handler(newval,oldval){
        console.log('FormList',newval)
      }
    }
  },
  methods: {
    /** 导入 */
    ImportExcel(){
@@ -967,29 +974,7 @@
      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() {
@@ -1222,10 +1207,27 @@
          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
            this.crudOid=this.Formlist[this.selectRow].oid;
            this.gridCode()
          }else {
              this.ProData = [];
          }
        }).catch(res => {
          this.$message.error(res)
        })
        //  基本信息表单数据
          await getObjectByOid(this.nodeClickList.oid).then(res => {
            this.TreeList = res.data.data;
          }).catch(res => {
            this.$message.error(res)
          })
      } catch (error) {
        this.$message.error(error)
      }
    },
    gridCode(){
            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为空说明是初始状态
@@ -1247,21 +1249,6 @@
            }).catch(res => {
              this.$message.error(res)
            })
          }else {
              this.ProData = [];
          }
        }).catch(res => {
          this.$message.error(res)
        })
        //  基本信息表单数据
          await getObjectByOid(this.nodeClickList.oid).then(res => {
            this.TreeList = res.data.data;
          }).catch(res => {
            this.$message.error(res)
          })
      } catch (error) {
        this.$message.error(error)
      }
    },
    treeClick(e) {
      console.log(e);
@@ -1455,12 +1442,14 @@
    },
    //刷新
    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