xiejun
2023-12-07 05d45bd440ffc92e14e6c8728ac8956a0488c0ab
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -61,24 +61,27 @@
      >
    </el-upload>
    <template #footer>
      <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>
      <div style="display: inline-block" 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>
        <div style="display: inline-block">
          <el-button size="small" @click="dialogVisible = false">关闭</el-button>
        </div>
    </template>
    <ShowImportData
      v-if="showVisible"
@@ -191,6 +194,10 @@
        return {
          codeClassifyOid: this.codeClassifyOid,
        };
      } else if (this.type === 'groupCode') {
        return {
          codeClassifyOid: this.codeClassifyOid,
        };
      }
    },
  },
@@ -257,7 +264,9 @@
            "2.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存",
            "3.Excel第一行和第二行依次为企业编码和集团编码(必填)"
          ],
          action: "/api/ubcs-code/mdmEngineController/importGroupCode"
          action: "/api/ubcs-code/mdmEngineController/importGroupCode",
          downloadTemplateFun: null,
          upParams: "classifyAttr",
        }
      },
      secDTOList: [],
@@ -314,6 +323,7 @@
      }
    },
    onSuccess(res) {
      console.log(res)
      if (Object.keys(res.data).length === 0) {
        this.$message.success(this.title + "导入成功!");
        this.resetTable()