Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6a6587bea7
|
|
@ -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 {
|
|||
}}
|
||||
/>
|
||||
</WeaRightMenu>
|
||||
{importVisible && <ImportDialog ecId={`${this && this.props && this.props.ecId || ''}_ImportDialog@633i8k`} />}
|
||||
</WeaLeftRightLayout>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 = (
|
||||
<Menu onClick={this.handleMenuClick}>
|
||||
<Menu.Item key="1">第一个菜单项</Menu.Item>
|
||||
<Menu.Item key="2">第二个菜单项</Menu.Item>
|
||||
<Menu.Item key="3">第三个菜单项</Menu.Item>
|
||||
{
|
||||
!this.isEmptyObject(data) && data.buttons.slice(3).map((item,index) => {
|
||||
return (
|
||||
<Menu.Item key="1" url={item.url}>{item.name}</Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -235,14 +238,20 @@ export default class ResourceCard extends React.Component {
|
|||
</div>
|
||||
</div>
|
||||
<div className='right-button'>
|
||||
<Button className='item' onClick={() => { window.location.href = `/spa/organization/static/index.html#/main/organization/resourceExtend/${data.user.id}`}}>编辑人员</Button>
|
||||
{/* <Button className='item'>调动</Button>
|
||||
<Button className='item'>离职</Button>
|
||||
<Dropdown overlay={menu}>
|
||||
<Button style={{ marginLeft: 8 }} className='item'>
|
||||
更多操作 <Icon type="down" />
|
||||
</Button>
|
||||
</Dropdown> */}
|
||||
{
|
||||
data.buttons.slice(0,3).map((item,index) => {
|
||||
return (
|
||||
<Button className='item' onClick={() => { window.location.href = item.url.replaceAll("${id}",data.user.id)}}>{item.name}</Button>
|
||||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
data.buttons.length > 3 ? <Dropdown overlay={menu}>
|
||||
<Button style={{ marginLeft: 8 }} className='item'>
|
||||
更多操作 <Icon type="down" />
|
||||
</Button>
|
||||
</Dropdown> : ''
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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: "",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue