dangsn
2023-08-04 2fa7336da9fa78ed24a4285198f0bcbccfd4109f
Merge remote-tracking branch 'origin/master'
已修改6个文件
172 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/GetItem.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyTemplateAttrServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js
@@ -45,7 +45,14 @@
    data
  })
}
//已发布数据更改
export function upSaveCode(data) {
  return request({
    url: 'api/ubcs-code/mdmEngineController/upSaveCode',
    method: 'POST',
    data
  })
}
//流程执行中表头
export function FlowTable(data){
  return request({
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -57,6 +57,7 @@
        data: []
      },
      exportArr:{},
      exportArrTwo:{},
      ids:""
    };
  },
@@ -68,7 +69,6 @@
    //表头数据 用来渲染穿梭框
    tableHeadData: {
      handler(newval, oldval) {
        console.log(newval)
        if (newval) {
          // 清空data数组
          this.data = [];
@@ -80,7 +80,6 @@
              key: index,
            });
          });
          console.log(this.data)
          // excel表格数据转换
          this.option.column[0].children = newval.map(obj => {
            return {
@@ -107,6 +106,11 @@
    codeClassifyOid:{
      handler(newval,oldval){
      }
    },
    value:{
      handler(newval,oldval){
        console.log('value',newval)
      }
    }
  },
  computed:{
@@ -125,16 +129,54 @@
      this.$emit('update:visible', false);
    },
    handleExcel(){
      if(this.value <= 0){
        this.$message.warning('请选择属性')
      }else {
        this.value.map(index => this.tableHeadData[index].prop).forEach((item, index) => {
          this.exportArr[`attrIdIndexMap[${index}]`] = item
        })
        if(this.radio === 0){
          if(this.selectRow.length<=0){
            this.ids=this.tableData.map(item => item.oid).join(',')
            exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{
            this.$message.warning('请选择要导出的模板')
          }else {
            //已选择多选
            const selectList=[]
            //已选择属性
            let exportArr={}
            this.ids = this.selectRow.map(item => item.oid).join(',')
            this.selectRow.forEach(item=>{
              selectList.push(
                item.oid
              )
            })
            if(this.value <= 0){
              this.tableHeadData.map(item => item.prop)
                .forEach((prop, index) => {
                  this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
                });
              exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArrTwo,limit:-1}).then(res=>{
                // console.log('res',res)
                if(res){
                  func.downloadFileByBlobHandler(res);
                  this.escHandler()
                }
              })
            }else {
              exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{
                // console.log('res',res)
                if(res){
                  func.downloadFileByBlobHandler(res);
                  this.escHandler()
                }
              })
            }
            }
        }else if(this.radio === 1){
          if(this.value <= 0){
            this.tableHeadData.map(item => item.prop)
              .forEach((prop, index) => {
                this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
              });
            exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:-1}).then(res=>{
              // console.log('res',res)
              if(res){
                func.downloadFileByBlobHandler(res);
@@ -142,34 +184,14 @@
              }
            })
          }else {
            //已选择多选
            const selectList=[]
            //已选择属性
            let exportArr={}
            const ids = this.selectRow.map(item => item.oid).join(',')
            this.selectRow.forEach(item=>{
              selectList.push(
                item.oid
              )
            })
            exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{
            exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{
              // console.log('res',res)
              if(res){
                func.downloadFileByBlobHandler(res);
                this.escHandler()
              }
            })
          }
        }else if(this.radio === 1){
          this.ids=this.tableData.map(item => item.oid).join(',')
          exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{
            // console.log('res',res)
            if(res){
              func.downloadFileByBlobHandler(res);
              this.escHandler()
            }
          })
        }else if(this.radio === 2){
          const input = this.pageExport.trim();
          let start, end;
@@ -195,17 +217,28 @@
              return;
            }
          }
          exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => {
            // console.log('res',res)
            if (res) {
              func.downloadFileByBlobHandler(res);
              this.escHandler()
            }
          });
          if(this.value >=1 ){
            exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => {
              // console.log('res',res)
              if (res) {
                func.downloadFileByBlobHandler(res);
                this.escHandler()
              }
            });
          }else {
            this.tableHeadData.map(item => item.prop)
              .forEach((prop, index) => {
                this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
              });
            exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:this.limit,page: start, endPage: end}).then(res=>{
              // console.log('res',res)
              if(res){
                func.downloadFileByBlobHandler(res);
                this.escHandler()
              }
            })
          }
        }
      }
    },
  }
}
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -67,7 +67,7 @@
                              :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid"
                              :title="'已发布数据更改'"
                              type="edit"
                              :visible.sync="DataVisible"></FormTemplateDialog>
                              :visible.sync="DataVisible" @submit="updataSumbit"></FormTemplateDialog>
          <!--          发布-->
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow"
                         @onLoad="onLoad"></set-personnel>
@@ -116,7 +116,7 @@
  </basic-container>
</template>
<script>
import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode} from "@/api/GetItem";
import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode} from "@/api/GetItem";
import {processTS, changeStatus} from "@/api/template/setPersonnel"
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
import integrationTransfer from "@/views/integration/integrationTransfer";
@@ -300,8 +300,6 @@
    },
    tableDataArray: {
      handler(newval, oldval) {
        this.keyWordFind='';
        this.WupinFindValue=''
        this.tableData = newval;
        this.searchResults = newval
        this.doLayout()
@@ -323,8 +321,13 @@
              }
            }
          }
          if(_index==0){
            this.keyWordFind=record.field
          }
        })
        this.tableHeadFindDatas = newval;
        this.WupinFindValue=''
      },
    },
    total: {
@@ -849,6 +852,7 @@
        this.$message.warning("只有状态为已发布的数据才能进行数据更改");
      } else {
        this.DataVisible = true;
        this.rowOid = this.selectRow[0]['oid']
      }
    },
    //增加保存
@@ -868,6 +872,15 @@
        })
      })
    },
    updataSumbit(val){
      this.DataVisible = false;
      upSaveCode(val).then(res=>{
        res.data.data.copyfromversion=this.rowOid
        this.$nextTick(() => {
          this.onLoad()
        })
      })
    },
    openBatchImport(type) {
      this.batchImportData.visible = true
      this.batchImportData.type = type
@@ -875,10 +888,10 @@
    },
    //输入回车搜索
    tableFindInp() {
      if (this.WupinFindValue.trim() === '') {
      /*if (this.WupinFindValue.trim() === '') {
        this.$message.warning('输入值不能为空')
        return;
      }
      }*/
      TableData({
        templateOid: this.templateOid,
        codeClassifyOid: this.codeClassifyOid,
@@ -886,7 +899,6 @@
        limit: this.page.pageSize,
        [ 'conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*'
      }).then(res => {
        console.log(res)
        this.tableData = res.data.data
      })
    }
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两个弹窗。
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -236,12 +236,14 @@
//            .selectOne(Condition.getQueryWrapper(condition,CodeClassify.class));
        if(detail == null){//不是最新的不让改
            throw new ServiceException("当前数据不是最新,请刷新后再修改!");
//            return R.fail("当前数据不是最新,请刷新后再修改!");
        }
        //校验下级是否有引用
        if(checkChildIsLinked(detail.getOid())){
            return R.fail("dataCascadeLinkedNotDelete");
        }
        if(checkHasChild(detail.getOid())){
            return R.fail("此数据有下级,无法进行删除!");
        }
        return R.status(!checkHasChild(detail.getOid()));
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyTemplateAttrServiceImpl.java
@@ -308,7 +308,7 @@
            query.setCurrent(pageHelper.getPage());
        }
        IPage<CodeClassifyTemplateAttr> doList = baseMapper.
            selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class));
            selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class).orderByAsc("ordernum"));
        if (!CollectionUtils.isEmpty(doList.getRecords())) {
            dataGrid.setData(codeClassifyTemplateAttrDO2VOs(doList.getRecords()));
            dataGrid.setTotal(VciBaseUtil.getInt(String.valueOf(baseMapper.selectCount(UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class)))));