田源
2023-08-01 c773bee8a36f1307626a07c6878a3d28b032da81
分类注入数据回填
已修改4个文件
106 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/BatchImport/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -253,7 +253,6 @@
        });
    },
    onSuccess(res) {
      console.log('res',res)
      if (Object.keys(res.data).length === 0) {
        this.$message.success(this.title + "导入成功!");
        this.dialogVisible = false;
@@ -263,7 +262,6 @@
        const fileName = res.data.filePath.split("/").pop();
        this.$message.error("请下载错误信息文件进行查看!");
        downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => {
          console.log('res2',res2)
          this.$utilFunc.downloadFileByBlob(res2.data, fileName);
        });
      }
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -449,7 +449,6 @@
                    const result = this.$route.query.id.substring(0, index);
                    const oid = this.selectRow.map(obj => obj.oid).join(",");
                      changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => {
                        console.log(res);
                        if(res.data.code == 200 ){
                          this.$message.success('停用成功')
                          this.onLoad()
@@ -476,7 +475,6 @@
        this.$message.warning("请选择一条数据");
      } else {
        let hasEditing = this.selectRow.every(item => item.lcstatus == 'Disabled');
        console.log('hasEditing',hasEditing)
        let showMessage = true;
        this.selectRow.forEach(item => {
          if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) {
@@ -502,7 +500,6 @@
                    const result = this.$route.query.id.substring(0, index);
                    const oid = this.selectRow.map(obj => obj.oid).join(",");
                    changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => {
                      console.log(res);
                      if(res.data.code == 200 ){
                        this.$message.success('启用成功')
                        this.onLoad()
@@ -535,7 +532,6 @@
        // 停用-只能启用、回收
        const disabledCount = this.selectRow.filter(item => item.lcstatus === 'Disabled').length;
        const releasedCount = this.selectRow.filter(item => item.lcstatus === 'Released').length;
        console.log('hasEditing',disabledCount,releasedCount)
        let showMessage = true;
        this.selectRow.forEach(item => {
          if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) {
@@ -562,7 +558,6 @@
                    const result = this.$route.query.id.substring(0, index);
                    const oid = this.selectRow.map(obj => obj.oid).join(",");
                    changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => {
                      console.log(res);
                      if(res.data.code == 200 ){
                        this.$message.success('回收成功')
                        this.onLoad()
@@ -621,7 +616,6 @@
    },
    doLayout() {
      this.$nextTick(() => {
        console.log(this.$refs)
        this.$refs.crud.doLayout();
      });
    },
@@ -703,7 +697,6 @@
      list.forEach((item) => {
        this.parameter.ids.push(item.oid);
      });
      console.log(this.selectRow)
    },
    //选择
    handleSelection(list, row) {
@@ -740,7 +733,6 @@
        codeClassifyOid: this.codeClassifyOid,
        ...val,
      }).then((res) => {
        console.log(res);
        this.tableData = res.data.data;
        this.page.total = res.data.total
      });
@@ -770,9 +762,7 @@
    //增加保存
    AddSumbit(val) {
      this.addvisible = false;
      console.log(val)
      addSaveCode(val).then(res => {
        console.log(res)
        this.$nextTick(() => {
          this.onLoad()
        })
@@ -780,9 +770,7 @@
    },
    EditSumbit(val) {
      this.editvisible = false;
      console.log(val)
      editSaveCode(val).then(res => {
        console.log(res)
        this.$nextTick(() => {
          this.onLoad()
        })
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -414,7 +414,6 @@
      }
    },
    'injectOption.classifyInvokeAttr': function(newVal) {
      console.log('newVal',newVal)
      if (newVal === "name") {
        this.injectOption.classifyInvokeAttrName='分类名称'
      } else if (newVal === "id") {
@@ -1485,9 +1484,6 @@
    })
  },
  methods: {
    formAttr(row, column) {
      console.log(row,column)
    },
    //新增搜索
    AddFindHandler(){
      if(this.SelectValue == 'id'){
@@ -1508,7 +1504,6 @@
    },
    //参照配置子组件
    echoReferConfig(val){
      console.log('val--',val)
      this.referObject=val
      this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
@@ -1529,12 +1524,10 @@
        this.$message.warning('请选择模板属性')
      } else  {
        this.attrVisible = true;
       console.log(this.attrSelectList)
      }
    },
    //属性分组提交
    attrHandle() {
      console.log(this.attrSelectList)
      this.attrSelectList.forEach(item=>{
        item.attributeGroup=this.attrModel
      })
@@ -1611,7 +1604,6 @@
    //业务类型选择
    businessSelect(selection, row) {
      this.busineSelectList = selection;
      console.log(selection)
    },
    // 从业务类型中选择数据弹窗
    busineHandle() {
@@ -1670,7 +1662,6 @@
    selectHandle(selection, row) {
      this.attrOid = row.oid;
      this.attrRow = row;
      console.log(row)
    },
    //表格选择
    selectionChange(list) {
@@ -1712,10 +1703,18 @@
               referConfig:'',
             }
           }
           console.log('--',this.referConfigOption)
           // this.$refs.referConfigFormDialog.onloadAttrData();
         }else if(column.property == 'classifyInvokeText'){
           this.injectVisible=true;
           this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr;
           this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName;
           this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag;
           if(this.CurrentCell.classifyInvokeLevel == 'min'){
             this.injectOption.classifyInvokeLevel='min'
           }else {
             this.injectOption.classifyInvokeLevel='max'
             this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel;
           }
         }else if(column.property == 'componentRule'){
           if(this.CurrentCell){
             this.CurrentCell.componentRule=this.componentRuleText;
@@ -1733,7 +1732,6 @@
             'conditionMap[oid_notequal]': this.CurrentCell.oid,
             limit:-1
           }).then(res => {
             console.log(res)
             this.CascadeData = res.data.data;
           })
           this.CascadeVisible=true;
@@ -1854,7 +1852,6 @@
    },
    //验证规则检查
    rulesExamine() {
      console.log(this.RulesForm.expressionText)
      const regex = new RegExp(this.rulesData.ruleRowBds);
      if(regex.test(this.RulesForm.TestContent)){
        this.$message.success('校验成功')
@@ -1879,23 +1876,6 @@
        "层级设置": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min',
        "是否可修改": this.injectOption.classifyInvokeEditFlag
      }
      //单元格编辑赋值一遍
      // noinspection JSCheckFunctionSignatures
      if(this.CurrentCell){
        //如果是指定层赋值为数字
        if(this.injectOption.classifyInvokeLevel!== 'min'){
          this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber
        }else {
          this.CurrentCell.classifyInvokeLevel='min'
        }
        //其余正常赋值
        this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr,
        this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName,
        this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag,
        // this.$set(this.CurrentCell, 'classifyInvokeText', data)
          this.CurrentCell.classifyInvokeText = data;
        this.injectHandleReset()
      }else {
        //勾选操作
        for (const key in this.injectOption) {
          this.attrSelectList[0][key] = this.injectOption[key];
@@ -1908,7 +1888,7 @@
          this.$set(this.attrSelectList[0],'classifyInvokeText',data)
        }
        this.injectHandleReset()
      }
      if(this.injectOption.classifyInvokeLevel !== 'min'){
        this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber;
      }else  {
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -731,11 +731,7 @@
  },
  watch:{
    FormList:{
      handler(newval,oldval){
        console.log('FormList',newval)
      }
    }
  },
  methods: {
    /** 导入 */
@@ -746,17 +742,12 @@
    ExportExcel(){
      if(this.nodeClickList){
        exportClassify({oid:this.nodeClickList.oid}).then(res=>{
          console.log(res)
          func.downloadFileByBlob(res);
        })
      }else {
        this.$message.warning('请先选择要导出的主题库分类')
      }
    },
    //模板管理已发布编辑
    // checkShowEditBtn() {
    //   this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released');
    // },
    //编码规则失焦
    CodeFoucus(){
      this.MasterdialogVisible=true;
@@ -1203,7 +1194,6 @@
              return item.codeclassifyoid == this.nodeClickList.oid
            }
          })
          console.log('form',this.Formlist)
          if(this.Formlist.length >= 1){
            this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
            this.crudArray.push(this.Formlist[this.selectRow]);
@@ -1314,7 +1304,6 @@
        });
      } else {
        this.$set(row, "codeclassifyoid", this.nodeClickList.oid)
        console.log(this.nodeClickList)
        addSave(row).then(() => {
          this.$message({
            type: "success",
@@ -1354,20 +1343,6 @@
        });
      })
    },
    //模板管理表格查询,只有一条数据没必要做搜索
    /*nterFind() {
      if (this.findText == "") {
        gridCodeClassifyTemplate().then(res => {
          this.Formlist = res.data.data
        })
      } else {
        gridCodeClassifyTemplate().then(res => {
          this.Formlist = res.data.data.filter(item => {
            return item.name.includes(this.findText)
          })
        })
      }
    },*/
    //克隆模板查询
    CloneEnterFind(){
      gridCodeClassifyTemplate().then(res => {
@@ -1448,8 +1423,29 @@
          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]);
          gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]':  res.data.data[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)
          })
        })
      } else {
        this.FormLoing = true