From 01dc126302e8d78bed9b9225a20db17dbe468a5b Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 22 Sep 2022 18:55:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=8D=A1=E7=89=87=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resource/FormItem.js | 59 ++++++ .../components/resource/IframeItem.js | 44 ++++ .../components/resource/ResourceCard.js | 182 ++++++++++++++++- pc4mobx/organization/images/resource.png | Bin 0 -> 7207 bytes pc4mobx/organization/stores/resourceCard.js | 117 ++++++++++- pc4mobx/organization/style/card.less | 192 ++++++++++++++++++ pc4mobx/organization/style/common.less | 2 - 7 files changed, 583 insertions(+), 13 deletions(-) create mode 100644 pc4mobx/organization/components/resource/FormItem.js create mode 100644 pc4mobx/organization/components/resource/IframeItem.js create mode 100644 pc4mobx/organization/images/resource.png create mode 100644 pc4mobx/organization/style/card.less diff --git a/pc4mobx/organization/components/resource/FormItem.js b/pc4mobx/organization/components/resource/FormItem.js new file mode 100644 index 0000000..571b717 --- /dev/null +++ b/pc4mobx/organization/components/resource/FormItem.js @@ -0,0 +1,59 @@ +import { + WeaFormItem, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + i18n +} from '../../public/i18n'; + +import '../../style/common.less'; +import Group from '../group/Group'; +import { chunk } from 'lodash'; + +export default class FormItem extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + render() { + const { + groupInfo + } = this.props, { + } = this.state; + const newData = chunk(groupInfo.items, 3); + + return ( +
+
+
+

{groupInfo.title}

+
+
+ {newData.map((item, index) => { + return ( +
+ {item.map((subItem) => { + return ( +
+ {subItem.fieldId} + {subItem.fieldValue} +
+ + ); + })} +
+ ); + })} +
+ +
+ ) + } +} diff --git a/pc4mobx/organization/components/resource/IframeItem.js b/pc4mobx/organization/components/resource/IframeItem.js new file mode 100644 index 0000000..1f17337 --- /dev/null +++ b/pc4mobx/organization/components/resource/IframeItem.js @@ -0,0 +1,44 @@ +import { + WeaFormItem, +} from 'ecCom' + +import { + Spin, + Button, +} from 'antd' + +import { + i18n +} from '../../public/i18n'; + +import '../../style/common.less'; +import Group from '../group/Group'; +import { chunk } from 'lodash'; + +export default class IframeItem extends React.Component { + constructor(props) { + super(props); + this.state = { + } + } + + render() { + const { + iframeInfo + } = this.props, { + } = this.state; + + return ( +
+
+
+

{iframeInfo.title}

+
+
+