Commit ad7a7b13 authored by zhuyangbin's avatar zhuyangbin

备注字段

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