田源
2023-07-26 9675f1491ef23c4c6f69cb83cbf6de3fd6dac61b
主数据导出
已修改5个文件
56 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/GetItem.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js
@@ -60,7 +60,14 @@
export function exportCode(data){
  return request({
    url: 'api/ubcs-code/mdmEngineController/exportCode',
    method: 'post',
    method: 'excel',
    responseType: 'json', // 设置响应类型为arraybuffer
    headers: {
      'Content-Type': 'application/vnd.ms-excel', // 设置请求头为二进制流类型
      // 在这里可以设置其他请求头信息
      // 例如:
      // 'Authorization': 'Bearer your-token',
    },
    params:{
      ...data
    }
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -562,7 +562,7 @@
            this.$message.warning('选择的数据中状态无需再执行当前操作');
            showMessage = false;
          } else if (this.selectRow.length >=1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) {
            //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度 则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true
            //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true
            processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => {
              if (res.data.records != [] && res.data.code != 200) {
                this.userName = localStorage.getItem("username");
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -132,8 +132,32 @@
            exportArr[`attrIdIndexMap[${index}]`] = item
          })
          exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':ids,...exportArr}).then(res=>{
            console.log(res)
            console.log('res',res)
            const filename = '下载.xlsx'; // 下载的文件名
            const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
            const a = document.createElement('a');
            const url = window.URL.createObjectURL(blob);
            a.href = url;
            a.download = filename;
            a.style.display = 'none';
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            window.URL.revokeObjectURL(url);
            // const filename = '下载.xlsx'; // 下载的文件名
            // const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' });
            //
            // const url = window.URL.createObjectURL(blob);
            // const link = document.createElement('a');
            // link.href = url;
            // link.setAttribute('download', filename);
            // document.body.appendChild(link);
            // link.click();
            // document.body.removeChild(link);
            // URL.revokeObjectURL(url);
          })
        }
      };
    },
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -83,10 +83,12 @@
      // console.log(this.$route)
      console.log(this.idData)
      getTreeList({'conditionMap[id]':this.idData }).then(res=>{
        console.log(res)
        this.Treedata=res.data
        const [firstProperty] = res.data;
        this.ModifyProperties(this.Treedata, 'text', 'label');
        this.codeClassifyOid=res.data[0].oid;
        this.coderuleoid=res.data[0].attributes.coderuleoid;
        this.codeClassifyOid=firstProperty.oid;
        this.coderuleoid=firstProperty.attributes.coderuleoid;
        this.$emit("coderuleoid", this.coderuleoid )
      }).catch(res=>{
        console.log(res)
@@ -137,7 +139,7 @@
          }
          this.tableHeadDataFateher = res.data;
          this.templateOids = res.data.tableDefineVO.oid;
          let List = res.data.tableDefineVO.cols[0];
          const [List] = res.data.tableDefineVO.cols;
          List.forEach(item => {
            let columnItem = {
              label: item.title,
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1588,7 +1588,10 @@
        this.isShowformulaEdit = true;
      }else if(column.property == 'enumString'){
        this.enumVisible=true;
        this.tableData=JSON.parse(this.CurrentCell.enumString)
        if(this.attrSelectList[0].enumString != ""){
          this.tableData=JSON.parse(this.attrSelectList[0].enumString)
          return
        }
      }else if(column.property == 'parentCode'){
        gridCodeClassifyTemplateAttr({
          'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
@@ -1632,7 +1635,11 @@
        this.$message.warning('请选择一条模板属性')
      } else if (this.attrSelectList.length === 1) {
        this.enumVisible = true;
        this.tableData=JSON.parse(this.attrSelectList[0].enumString)
        if(this.attrSelectList[0].enumString != ""){
          this.tableData=JSON.parse(this.attrSelectList[0].enumString)
          return
        }
      }
    },
    enumBeforeClose(done){