From 25dd4020ca152339c47cd944daf27d51c58eb937 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 11 Nov 2022 17:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/office/officeManage.js | 6 +++- .../components/resource/ResourceCard.js | 35 ++++++++++++------- pc4mobx/organization/stores/resourceCard.js | 7 ++++ pc4mobx/organization/style/card.less | 10 +++--- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/pc4mobx/organization/components/office/officeManage.js b/pc4mobx/organization/components/office/officeManage.js index c80df47..6420223 100644 --- a/pc4mobx/organization/components/office/officeManage.js +++ b/pc4mobx/organization/components/office/officeManage.js @@ -9,6 +9,8 @@ import { Button, Col, message, Modal, Row, Spin, Switch } from "antd"; import { WeaSwitch, WeaTableNew } from "comsMobx"; import "./index.less"; import { renderNoright } from "../../util"; +import ImportDialog from '../ImportDialog'; + const confirm = Modal.confirm; const WeaTable = WeaTableNew.WeaTable; @@ -413,7 +415,7 @@ export default class OfficeManage extends Component { }; render() { - const { officeManageStore } = this.props; + const { officeManageStore,importDialog } = this.props; const { date, loading, deleteOfficeClassifyFlag } = this.state; const { isPanelShow, @@ -428,6 +430,7 @@ export default class OfficeManage extends Component { dialogLoading, hasRight } = officeManageStore; + const {importVisible} = importDialog; if (hasRight === false) { return renderNoright(); @@ -513,6 +516,7 @@ export default class OfficeManage extends Component { }} /> + {importVisible && } ); diff --git a/pc4mobx/organization/components/resource/ResourceCard.js b/pc4mobx/organization/components/resource/ResourceCard.js index f34b456..a2a58d9 100644 --- a/pc4mobx/organization/components/resource/ResourceCard.js +++ b/pc4mobx/organization/components/resource/ResourceCard.js @@ -130,7 +130,7 @@ export default class ResourceCard extends React.Component { // } handleMenuClick = (e) => { - console.log('click', e); + window.open(e.item.props.url,"_blank") } onScroll = (event) => { @@ -190,12 +190,15 @@ export default class ResourceCard extends React.Component { intervalTime, data } = resourceCard; - const menu = ( - 第一个菜单项 - 第二个菜单项 - 第三个菜单项 + { + !this.isEmptyObject(data) && data.buttons.slice(3).map((item,index) => { + return ( + {item.name} + ) + }) + } ); @@ -235,14 +238,20 @@ export default class ResourceCard extends React.Component {
- - {/* - - - - */} + { + data.buttons.slice(0,3).map((item,index) => { + return ( + + ) + }) + } + { + data.buttons.length > 3 ? + + : '' + }
diff --git a/pc4mobx/organization/stores/resourceCard.js b/pc4mobx/organization/stores/resourceCard.js index 5d7f144..af71ec6 100644 --- a/pc4mobx/organization/stores/resourceCard.js +++ b/pc4mobx/organization/stores/resourceCard.js @@ -62,6 +62,13 @@ export class ResourceCardStore { } /************** json数据*****************/ // @observable data = { + // buttons:[ + // { + // name:'编辑卡片', + // url:'http://www.com/${id}?userid=${id}', + // sysDefault:0 + // }, + // ] // user: { // id:23, // image: "", diff --git a/pc4mobx/organization/style/card.less b/pc4mobx/organization/style/card.less index a4e0958..6cccbdd 100644 --- a/pc4mobx/organization/style/card.less +++ b/pc4mobx/organization/style/card.less @@ -63,11 +63,11 @@ .right-button{ float: right; line-height: 75px; - .item { - background-color: #2b68f0; - color: #ffffff; - margin-left: 10px; - } + .item { + background-color: #2b68f0; + color: #ffffff; + margin-left: 10px; + } } }