From c39acd25c3e8747be16773a003f519e4ef801640 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 17 一月 2023 16:44:16 +0800 Subject: [PATCH] 2023-01-17 --- src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx index b2c76db..86891ed 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { notification } from 'antd' -import * as XLSX from 'xlsx' +import * as XLSX from 'sheetjs-style' import Utils from '@/utils/utils.js' import './index.scss' @@ -61,8 +61,12 @@ btn.verify.columns.forEach(op => { let _name = typeof(header[op.Column]) === 'string' ? header[op.Column].replace(/(^\s*|\s*$)/g, '') : header[op.Column] let _text = op.Text ? op.Text.replace(/(^\s*|\s*$)/g, '') : op.Text - - if (_name !== _text && !iserror) { + + if (!_name && !iserror) { + iserror = true + errors = 'headerError' + errDetail = `Excel涓笉瀛樺湪锛�${_text}锛夊垪锛乣 + } else if (_name !== _text && !iserror) { iserror = true errors = 'headerError' errDetail = `Excel涓紙${_name}锛変笌鎸夐挳鍒椾俊鎭紙${_text}锛変笉涓�鑷达紒` -- Gitblit v1.8.0