From f267d04e0561a0a20d1f2a9f558a273558ece90d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 24 五月 2021 17:50:19 +0800 Subject: [PATCH] 2021-05-24 --- src/tabviews/zshare/actionList/excelInbutton/index.jsx | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 549dd47..988d6f9 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -6,7 +6,7 @@ import { Button, Modal, notification, message } from 'antd' import ExcelIn from './excelin' -import Utils from '@/utils/utils.js' +import Utils, { getExcelInSql } from '@/utils/utils.js' import options from '@/store/options.js' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -103,7 +103,7 @@ } let primaryId = '' // 瀵煎叆鏃惰Id - if (btn.Ot === 'requiredSgl') { + if (btn.Ot === 'requiredSgl' && setting.primaryKey) { primaryId = data[0][setting.primaryKey] || '' } @@ -194,7 +194,7 @@ /** * @description Excel 瀵煎叆 */ - getexceldata = (data, errors, sheetName) => { + getexceldata = (data, errors, sheetName, errDetail) => { const { btn } = this.props if (errors) { @@ -213,7 +213,7 @@ } else if (errors === 'headerError') { notification.warning({ top: 92, - message: '宸ヤ綔琛ㄣ��' + sheetName + '銆嬭〃澶磋缃敊璇紝璇锋鏌ヨ〃澶翠腑鐨勫悕绉板強椤哄簭锛屼笌鎸夐挳Excel鍒椾俊鎭槸鍚︿竴鑷达紒', + message: `宸ヤ綔琛ㄣ��${sheetName}銆嬭〃澶撮敊璇紝${errDetail}`, duration: 5 }) } @@ -238,7 +238,7 @@ }) } - let result = Utils.getExcelInSql(btn, data, this.state.dict, (this.props.BID || '')) + let result = getExcelInSql(btn, data, this.state.dict, (this.props.BID || '')) if (result.errors) { notification.warning({ @@ -426,7 +426,7 @@ type="link" title={show === 'icon' ? btn.label : ''} loading={loading} - style={btn.btnstyle} + style={btn.style} icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))} onClick={() => {this.actionTrigger()}} >{show === 'icon' ? '' : btn.label}</Button> -- Gitblit v1.8.0