Merge pull request '导入设置' (#20) from feature/cl into dev
Reviewed-on: http://221.226.25.34:3000/liang.cheng/trunk/pulls/20
This commit is contained in:
commit
17bd109269
|
|
@ -9,6 +9,8 @@ import { Button, Col, message, Modal, Row, Spin, Switch } from "antd";
|
||||||
import { WeaSwitch, WeaTableNew } from "comsMobx";
|
import { WeaSwitch, WeaTableNew } from "comsMobx";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { renderNoright } from "../../util";
|
import { renderNoright } from "../../util";
|
||||||
|
import ImportDialog from '../ImportDialog';
|
||||||
|
|
||||||
|
|
||||||
const confirm = Modal.confirm;
|
const confirm = Modal.confirm;
|
||||||
const WeaTable = WeaTableNew.WeaTable;
|
const WeaTable = WeaTableNew.WeaTable;
|
||||||
|
|
@ -413,7 +415,7 @@ export default class OfficeManage extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore,importDialog } = this.props;
|
||||||
const { date, loading, deleteOfficeClassifyFlag } = this.state;
|
const { date, loading, deleteOfficeClassifyFlag } = this.state;
|
||||||
const {
|
const {
|
||||||
isPanelShow,
|
isPanelShow,
|
||||||
|
|
@ -428,6 +430,7 @@ export default class OfficeManage extends Component {
|
||||||
dialogLoading,
|
dialogLoading,
|
||||||
hasRight
|
hasRight
|
||||||
} = officeManageStore;
|
} = officeManageStore;
|
||||||
|
const {importVisible} = importDialog;
|
||||||
|
|
||||||
if (hasRight === false) {
|
if (hasRight === false) {
|
||||||
return renderNoright();
|
return renderNoright();
|
||||||
|
|
@ -513,6 +516,7 @@ export default class OfficeManage extends Component {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
|
{importVisible && <ImportDialog ecId={`${this && this.props && this.props.ecId || ''}_ImportDialog@633i8k`} />}
|
||||||
</WeaLeftRightLayout>
|
</WeaLeftRightLayout>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export default class ResourceCard extends React.Component {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
handleMenuClick = (e) => {
|
handleMenuClick = (e) => {
|
||||||
console.log('click', e);
|
window.open(e.item.props.url,"_blank")
|
||||||
}
|
}
|
||||||
|
|
||||||
onScroll = (event) => {
|
onScroll = (event) => {
|
||||||
|
|
@ -190,12 +190,15 @@ export default class ResourceCard extends React.Component {
|
||||||
intervalTime,
|
intervalTime,
|
||||||
data
|
data
|
||||||
} = resourceCard;
|
} = resourceCard;
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={this.handleMenuClick}>
|
<Menu onClick={this.handleMenuClick}>
|
||||||
<Menu.Item key="1">第一个菜单项</Menu.Item>
|
{
|
||||||
<Menu.Item key="2">第二个菜单项</Menu.Item>
|
!this.isEmptyObject(data) && data.buttons.slice(3).map((item,index) => {
|
||||||
<Menu.Item key="3">第三个菜单项</Menu.Item>
|
return (
|
||||||
|
<Menu.Item key="1" url={item.url}>{item.name}</Menu.Item>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -235,14 +238,20 @@ export default class ResourceCard extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='right-button'>
|
<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>
|
data.buttons.slice(0,3).map((item,index) => {
|
||||||
<Button className='item'>离职</Button>
|
return (
|
||||||
<Dropdown overlay={menu}>
|
<Button className='item' onClick={() => { window.location.href = item.url.replaceAll("${id}",data.user.id)}}>{item.name}</Button>
|
||||||
<Button style={{ marginLeft: 8 }} className='item'>
|
)
|
||||||
更多操作 <Icon type="down" />
|
})
|
||||||
</Button>
|
}
|
||||||
</Dropdown> */}
|
{
|
||||||
|
data.buttons.length > 3 ? <Dropdown overlay={menu}>
|
||||||
|
<Button style={{ marginLeft: 8 }} className='item'>
|
||||||
|
更多操作 <Icon type="down" />
|
||||||
|
</Button>
|
||||||
|
</Dropdown> : ''
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,13 @@ export class ResourceCardStore {
|
||||||
}
|
}
|
||||||
/************** json数据*****************/
|
/************** json数据*****************/
|
||||||
// @observable data = {
|
// @observable data = {
|
||||||
|
// buttons:[
|
||||||
|
// {
|
||||||
|
// name:'编辑卡片',
|
||||||
|
// url:'http://www.com/${id}?userid=${id}',
|
||||||
|
// sysDefault:0
|
||||||
|
// },
|
||||||
|
// ]
|
||||||
// user: {
|
// user: {
|
||||||
// id:23,
|
// id:23,
|
||||||
// image: "",
|
// image: "",
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,11 @@
|
||||||
.right-button{
|
.right-button{
|
||||||
float: right;
|
float: right;
|
||||||
line-height: 75px;
|
line-height: 75px;
|
||||||
.item {
|
.item {
|
||||||
background-color: #2b68f0;
|
background-color: #2b68f0;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue