田源
2023-12-05 42691d281c357269408158d0f02939d3357eca07
集团码导入
已修改4个文件
87 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/GetItem.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js
@@ -126,3 +126,13 @@
    }
  })
}
//集团码模板下载
export const exportGroupCodeExcel = (params) => {
  return request({
    url: '/api/ubcs-code/mdmEngineController/exportGroupCodeExcel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -13,7 +13,7 @@
      </li>
    </ul>
    <div
      v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'"
      v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'&& this.type !== 'groupCode'"
      class="radio_box"
    >
      <span>分类的路径使用的属性:</span>
@@ -61,21 +61,23 @@
      >
    </el-upload>
    <template #footer>
      <el-button
        v-if="type !== 'bulkEdit'"
        :loading="downloadLoading"
        size="small"
        type="primary"
        @click="downloadTemplateFun"
      >下载导入模板
      </el-button>
      <el-button v-if="type === 'bulkEdit'"
                 :loading="downloadLoading"
                 size="small"
                 type="primary"
                 @click="downloadTemplateFun"
      >下载编辑模板
      </el-button>
      <div v-if="type !== 'groupCode'">
        <el-button
          v-if="type !== 'bulkEdit' "
          :loading="downloadLoading"
          size="small"
          type="primary"
          @click="downloadTemplateFun"
        >下载导入模板
        </el-button>
        <el-button v-if="type === 'bulkEdit'"
                   :loading="downloadLoading"
                   size="small"
                   type="primary"
                   @click="downloadTemplateFun"
        >下载编辑模板
        </el-button>
      </div>
      <el-button size="small" @click="dialogVisible = false">关闭</el-button>
    </template>
    <ShowImportData
@@ -248,6 +250,15 @@
          downloadTemplateFun: downloadBatchApplyCodeTemplate,
          upParams: "classifyAttr",
        },
        groupCode: {
          title: "集团码导入",
          tipList: [
            "1.标题带五角星的表示关键属性,带星号表示必输项",
            "2.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存",
            "3.Excel第一行和第二行依次为企业编码和集团编码(必填)"
          ],
          action: "/api/ubcs-code/mdmEngineController/importGroupCode"
        }
      },
      secDTOList: [],
    };
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -187,7 +187,8 @@
  upSaveCode,
  applyGroupCode,
  receiveEditApply,
  applySaveCode
  applySaveCode,
  exportGroupCodeExcel
} from "@/api/GetItem";
import {processTS, changeStatus} from "@/api/template/setPersonnel"
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
@@ -553,8 +554,35 @@
        if (uniqueFlag === 'CODEAMEND') return this.codeAMENDHandler()
        //批量编辑
        if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler("bulkEdit")
        //集团码导出
        if (uniqueFlag === 'excelGroupCode') return this.excelGroupCode()
        //集团码导入
        if (uniqueFlag === 'importGroupCode') return this.importGroupCode("groupCode")
      });
    },
    importGroupCode(type){
      this.batchImportData.visible = true
      this.batchImportData.type = type
      this.batchImportData.codeClassifyOid = this.codeClassifyOid
    },
    //集团码导出
    excelGroupCode(){
      debugger
      this.isLoading = true;
      exportGroupCodeExcel({
        codeClassifyOid: this.codeClassifyOid,
      }).then(res => {
        console.log(res.data)
        if (res) {
          func.downloadFileByBlobHandler(res);
          this.$message.success('下载成功,请查看!');
          this.isLoading = false;
        }
      }).catch(error=>{
        this.$message.error(error);
        this.isLoading = false;
      })
    },
    //标准申请
    codeApplyHandler() {
      this.$nextTick(() => {
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -40,12 +40,12 @@
            </div>
          </div>
          <!--          左侧树-->
          <div style="height: calc(100vh - 230px);overflow: auto">
          <div style="height: calc(100vh - 230px);overflow: auto;">
            <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
                       :defaultExpandAll="false"
                       :option="Treeoption"
                       class="classifyTree"
                       style="height: calc(100vh - 280px)"
                       style="height: calc(100vh - 280px);"
                       @node-click="nodeClick"
            >
            </avue-tree>