From a4ba5d208b8335c634dffd612c2bf310b1dea607 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 八月 2020 15:49:30 +0800 Subject: [PATCH] 2020-08-17 --- src/templates/sharecomponent/datasourcecomponent/verifycard/index.jsx | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/templates/sharecomponent/datasourcecomponent/verifycard/index.jsx b/src/templates/sharecomponent/datasourcecomponent/verifycard/index.jsx index 2ef6c65..3e6abed 100644 --- a/src/templates/sharecomponent/datasourcecomponent/verifycard/index.jsx +++ b/src/templates/sharecomponent/datasourcecomponent/verifycard/index.jsx @@ -7,6 +7,7 @@ import Api from '@/api' import Utils from '@/utils/utils.js' +import asyncComponent from '@/utils/asyncComponent' import ColForm from './columnform' import CustomScriptsForm from './customscript' import SettingForm from './settingform' @@ -16,12 +17,16 @@ const { TabPane } = Tabs const { Paragraph } = Typography +const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) + class VerifyCard extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - config: PropTypes.object, // 鏁版嵁婧愪俊鎭� - menuId: PropTypes.string, // 鑿滃崟Id - searches: PropTypes.array, // 鎼滅储鏉′欢 + dict: PropTypes.object, // 瀛楀吀椤� + tableFields: PropTypes.any, // 鏁版嵁婧愪俊鎭� + permFuncField: PropTypes.any, // 鏁版嵁婧愪俊鎭� + config: PropTypes.object, // 鏁版嵁婧愪俊鎭� + menuId: PropTypes.string, // 鑿滃崟Id + searches: PropTypes.array, // 鎼滅储鏉′欢 } state = { @@ -453,6 +458,12 @@ } } + updatefields = (columns) => { + this.setState({ + columns: columns + }) + } + /** * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 */ @@ -473,6 +484,7 @@ <SettingForm menuId={this.props.menuId} dict={this.props.dict} + permFuncField={this.props.permFuncField} columns={columns} setting={setting} scripts={scripts} @@ -485,6 +497,12 @@ columnChange={this.columnChange} wrappedComponentRef={(inst) => this.contrastForm = inst} /> + <FieldsComponent + config={{...this.props.config, columns}} + type="fields" + tableFields={this.props.tableFields} + updatefield={this.updatefields} + /> <Table bordered rowKey="uuid" -- Gitblit v1.8.0