Commit ad7a7b13 authored by zhuyangbin's avatar zhuyangbin

备注字段

parent 94ae04ca
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
.itemTitle { .itemTitle {
margin-left: @marginSm; margin-left: @marginSm;
color: @textPrimaryColor; color: @textPrimaryColor;
margin-right: 2px;
}
.remarkIcon{
color: #AEB4BA;
cursor: pointer;
} }
} }
} }
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
* 失去焦点:onBlurFn * 失去焦点:onBlurFn
* */ * */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Form, Button } from 'antd'; import { Form, Button, Tooltip } from 'antd';
import { emptyModel } from '@/submodule/components/apolloTable/component/base/_utils/setFormatter'; import { emptyModel } from '@/submodule/components/apolloTable/component/base/_utils/setFormatter';
import { defaultLocale } from '@/submodule/components/apolloTable/locale'; import { defaultLocale } from '@/submodule/components/apolloTable/locale';
import _ from 'lodash'; import _ from 'lodash';
import InconFont from '@/submodule/components/IconFont/IconFont';
import styles from './index.less'; import styles from './index.less';
import { config } from '../component/base/config'; import { config } from '../component/base/config';
import { transferAttr } from '../component/base/_utils/transferAttr'; import { transferAttr } from '../component/base/_utils/transferAttr';
...@@ -32,7 +33,9 @@ class FormWrap extends Component { ...@@ -32,7 +33,9 @@ class FormWrap extends Component {
handleSubmit = (e) => { handleSubmit = (e) => {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
const { rowId, form, handleSubmit, data, rowData, detailType } = this.props; const {
rowId, form, handleSubmit, data, rowData, detailType,
} = this.props;
form.validateFieldsAndScroll((err, values) => { form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
const newValues: any[] = []; const newValues: any[] = [];
...@@ -85,6 +88,11 @@ class FormWrap extends Component { ...@@ -85,6 +88,11 @@ class FormWrap extends Component {
<span className={styles.titleContainer}> <span className={styles.titleContainer}>
{/* icon && <div className={styles.colIcon}>{icon}</div> */} {/* icon && <div className={styles.colIcon}>{icon}</div> */}
<span className={styles.itemTitle}>{item.columnChsName}</span> <span className={styles.itemTitle}>{item.columnChsName}</span>
{item.columnAttrObj?.remark && (
<Tooltip title={item.columnAttrObj?.remark}>
<InconFont type="iconwenhao" className={styles.remarkIcon} />
</Tooltip>
)}
</span> </span>
); );
}; };
...@@ -93,12 +101,12 @@ class FormWrap extends Component { ...@@ -93,12 +101,12 @@ class FormWrap extends Component {
// 可输可选组件清空时数据格式有问题,单独处理一下 // 可输可选组件清空时数据格式有问题,单独处理一下
if (item.requiredFlag && Number(item.columnType) === 15 && typeof value === 'object') { if (item.requiredFlag && Number(item.columnType) === 15 && typeof value === 'object') {
if ( if (
!value.label && !value.label
value.label !== 0 && && value.label !== 0
!value.text && && !value.text
value.text !== 0 && && value.text !== 0
!value.value && && !value.value
value.value !== 0 && value.value !== 0
) { ) {
return callback('必填项不能为空'); return callback('必填项不能为空');
} }
...@@ -202,7 +210,9 @@ class FormWrap extends Component { ...@@ -202,7 +210,9 @@ class FormWrap extends Component {
}; };
render() { render() {
const { loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn } = this.props; const {
loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn,
} = this.props;
return ( return (
<Provider value={{ locale: this.getContext() }}> <Provider value={{ locale: this.getContext() }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment