人员卡片页面重做

This commit is contained in:
Chengliang 2022-10-18 13:58:48 +08:00
parent e498634292
commit edd7e4c2a6
12 changed files with 414 additions and 420 deletions

View File

@ -0,0 +1,8 @@
import {
WeaTools
} from 'ecCom'
export const getCardData = (id) => {
return WeaTools.callApi(`/api/bs/hrmorganization/personnelcard/getPersonnelCard?id=${id}`, 'GET');
}

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-05-18 14:52:39 * @Date: 2022-05-18 14:52:39
* @LastEditTime: 2022-09-08 17:11:51 * @LastEditTime: 2022-10-12 18:01:56
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/CompanyExtend.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/CompanyExtend.js
*/ */
@ -277,7 +277,8 @@ export default class CompanyExtend extends React.Component {
</div> </div>
) )
} catch (e) { }
catch (e) {
return <WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@h1wgnu`}> return <WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@h1wgnu`}>
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div> <div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
</WeaAlertPage> </WeaAlertPage>

View File

@ -26,6 +26,7 @@ import {
const Step = Steps.Step; const Step = Steps.Step;
import StepContent from './stepContent'; import StepContent from './stepContent';
import "../../style/common.less";
@inject("newImport") @inject("newImport")
@observer @observer
@ -71,6 +72,7 @@ export default class StepDialog extends React.Component {
return ( return (
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`} <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
className="new-edit-wrapper"
title={title} title={title}
icon="icon-coms-upload" icon="icon-coms-upload"
iconBgcolor="#217346" iconBgcolor="#217346"
@ -80,6 +82,7 @@ export default class StepDialog extends React.Component {
onCancel={() => newImport.init()} onCancel={() => newImport.init()}
buttons={buttons} buttons={buttons}
style={{ width: width, height: height }} style={{ width: width, height: height }}
initLoadCss
> >
<div style={{ marginTop: 24 }}> <div style={{ marginTop: 24 }}>
<Steps current={current}> <Steps current={current}>

View File

@ -28,13 +28,24 @@ export default class IframeItem extends React.Component {
} = this.state; } = this.state;
return ( return (
<div className='iframe-item' id={iframeInfo.id}> <div className='iframe-item' id={iframeInfo.id} >
<div className='title'> <div className='title'>
<div></div> <div></div>
<p>{iframeInfo.title}</p> <p>{iframeInfo.title}</p>
</div> </div>
<div className='content'> <div className='content' >
<iframe src={iframeInfo.url} width="100%" frameBorder="0"/> <iframe
id={iframeInfo.id+"-iframe"}
src={iframeInfo.url}
width="100%"
height="500px"
frameBorder="0"
scrolling="auto"
onLoad={() => {
// console.log(document.getElementById(iframeInfo.id+"-iframe").scrollHeight)
// document.getElementById(iframeInfo.id+"-iframe").height = 500 + "px"
}}
/>
</div> </div>
</div> </div>

View File

@ -20,7 +20,7 @@ import {
Button, Button,
message, message,
Switch, Switch,
Menu, Dropdown,Icon,Anchor Menu, Dropdown, Icon, Anchor
} from 'antd'; } from 'antd';
import { import {
@ -46,10 +46,9 @@ export default class ResourceCard extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
activity:0,//激活的锚点 activity: 0,//激活的锚点
detectElements: [], // 受监控元素,可能存在空项
} }
this.flag = false; // 点击Anchor菜单项,不执行监听滚动事件
} }
componentWillMount() { componentWillMount() {
@ -95,62 +94,76 @@ export default class ResourceCard extends React.Component {
const { const {
resourceCard resourceCard
} = this.props; } = this.props;
let { hash } = window.location;
hash = hash.split("?")[0];
let id = hash.match("[^/]+(?=/$|$)")[0];
resourceCard.userid = id;
resourceCard.init(); resourceCard.init();
this.buildDetectElements(); //生成受监控元素
} }
buildDetectElements = () => {
const {
resourceCard
} = this.props,{
data
} = resourceCard;
data.anchorList.map((item,index) => {
item.activity = index;
item.offset = document.getElementById(item.id).offsetTop + document.getElementById(item.id).clientHeight;
})
this.setState({
detectElements:data.anchorList
})
}
onScrollEnd = () => { onScrollEnd = () => {
const { // resourceCard.scrollLoading = true;
resourceCard
} = this.props; // setTimeout(() => {
resourceCard.scrollLoading = true; // // resourceCard.data.iframeList.push({
resourceCard.iframeList.push({ // // id: "job",
id:"job", // // title: "岗位管理",
title:"岗位管理", // // url: '/spa/organization/static/index.html#/main/organization/companyExtend/7'
url:'/spa/organization/static/index.html#/main/organization/companyExtend/7' // // })
}) // resourceCard.scrollLoading = false;
setTimeout(() => { // }, 2000);
resourceCard.scrollLoading = false;
}, 2000);
}; };
// buildDetectElements = () => {
// const {
// resourceCard
// } = this.props,{
// data
// } =resourceCard;
// !this.isEmptyObject(data) && data.anchorList.map((item, index) => {
// item.activity = index;
// item.offset = document.getElementById(item.id).offsetTop + document.getElementById(item.id).clientHeight;
// })
// resourceCard.setDetectElements(data.anchorList);
// }
handleMenuClick = (e) => { handleMenuClick = (e) => {
console.log('click', e); console.log('click', e);
} }
onScroll = (event) => { onScroll = (event) => {
const {
resourceCard
} = this.props,{
detectElements,
flag
} = resourceCard;
const postion = event.target.scrollTop; const postion = event.target.scrollTop;
let getActivityCurrent = this.state.activity; let getActivityCurrent = this.state.activity;
this.state.detectElements.map((item,index) => { detectElements.map((item, index) => {
if(postion >= document.getElementById(item.id).offsetTop &&postion <= item.offset){ if (postion >= document.getElementById(item.id).offsetTop && postion <= item.offset) {
return getActivityCurrent = item.activity; return getActivityCurrent = item.activity;
} }
}) })
if(event.target.scrollHeight == postion + event.target.clientHeight) {
getActivityCurrent = detectElements.length - 1
}
this.setState({ this.setState({
activity: getActivityCurrent activity: getActivityCurrent
}) })
}
}
scrollToAnchor = (anchorName,index) => { scrollToAnchor = (anchorName, index) => {
const {
resourceCard
} = this.props;
let _this = this;
if (anchorName) { if (anchorName) {
// 找到锚点 // 找到锚点
let anchorElement = document.getElementById(anchorName); let anchorElement = document.getElementById(anchorName);
@ -159,6 +172,13 @@ export default class ResourceCard extends React.Component {
} }
} }
isEmptyObject(obj) {
for (let key in obj) {
return false;
}
return true;
}
render() { render() {
const { const {
resourceCard resourceCard
@ -168,8 +188,7 @@ export default class ResourceCard extends React.Component {
offset, offset,
overtime, overtime,
intervalTime, intervalTime,
data, data
iframeList,
} = resourceCard; } = resourceCard;
const menu = ( const menu = (
@ -181,120 +200,117 @@ export default class ResourceCard extends React.Component {
); );
return ( return (
<WeaNewScrollPagination !this.isEmptyObject(data) && <WeaNewScrollPagination
height='100%' height='100%'
onScrollEnd={this.onScrollEnd} onScrollEnd={this.onScrollEnd}
onScroll = {this.onScroll} onScroll={this.onScroll}
> >
<div className="gutter-resource-card"> <div className="gutter-resource-card">
<div className="gutter-row"> <div className="gutter-row">
<div className='top'> <div className='top'>
<img src={require('../../images/resource.png')} /> <img src={data.user.image} />
<div className='user'> <div className='user'>
<div className='name'>{data.user.name} <div className='name'>{data.user.name}
<span>{data.user.sex == 0 ? <i className="icon-coms-men" /> : <i className="icon-coms-women" />}</span> <span>{data.user.sex == 0 ? <i className="icon-coms-men" /> : <i className="icon-coms-women" />}</span>
</div> </div>
<div className='icon-info'> <div className='icon-info'>
<i className="icon-coms-Send-message" /> <i className="icon-coms-Send-message" />
<i className="icon-coms-message-o" /> <i className="icon-coms-message-o" />
<i className="icon-coms-Send-emails" /> <i className="icon-coms-Send-emails" />
<i className="icon-coms-New-schedule-o" /> <i className="icon-coms-New-schedule-o" />
</div> </div>
<div className='content'> <div className='content'>
<div> <div>
<span className='label'><i className="icon-portal-email-o" /></span> <span className='label'><i className="icon-portal-email-o" /></span>
<span className='value'>{data.user.email}</span> <span className='value'>{data.user.email}</span>
<span className='label'><i className="icon-coms-contact" /></span> <span className='label'><i className="icon-coms-contact" /></span>
<span className='value'>{data.user.phone}</span> <span className='value'>{data.user.phone}</span>
</div>
<div style={{ marginTop: '10px' }}>
<span className='label'>账号类型:</span>
<span className='value'>{data.user.belongTo}</span>
<span className='label'>状态:</span>
<span className='value'>{data.user.status}</span>
</div>
</div>
</div> </div>
<div style={{ marginTop: '10px' }}> <div className='right-button'>
<span className='label'>账号类型:</span> <Button className='item' onClick={() => { window.location.href = `/spa/organization/static/index.html#/main/organization/resourceExtend/${data.user.id}`}}>编辑人员</Button>
<span className='value'>{data.user.belongTo}</span> <Button className='item'>调动</Button>
<span className='label'>状态:</span> <Button className='item'>离职</Button>
<span className='value'>{data.user.status}</span> <Dropdown overlay={menu}>
<Button style={{ marginLeft: 8 }} className='item'>
更多操作 <Icon type="down" />
</Button>
</Dropdown>
</div> </div>
</div> </div>
<div className='data'>
<Row type="flex" justify="space-between" style={{ height: '100%' }}>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/workflow.png" alt="" />
<div>
<p>流程总数</p>
<p onClick={() => { window.open(`/spa/workflow/static/index.html#/main/workflow/listDoing?resourceid=${data.user.id}`) }}>{data.statistical.workflowCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/doc.png" alt="" />
<div>
<p>文档总数</p>
<p onClick={() => { window.open(`/spa/document/static/index.html#/main/document/search?viewcondition=2&doccreaterid=${data.user.id}`) }}>{data.statistical.docCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/custom.png" alt="" />
<div>
<p>我的客户</p>
<p onClick={() => { window.open(`/spa/crm/static/index.html#/main/crm/customer/hrmView?searchHrmId=${data.user.id}`) }}>{data.statistical.cusCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/cowork.png" alt="" />
<div>
<p>我的协作</p>
<p onClick={() => { window.open(`/spa/cowork/static/index.html#/main/cowork/hrmview?searchHrmid=${data.user.id}`) }}>{data.statistical.collaborationCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/weibo.png" alt="" />
<div>
<p>微博总数</p>
<p onClick={() => { window.open(`/spa/blog/static/index.html#/user/${data.user.id}`) }}>{data.statistical.weiboCount}</p>
</div>
</Col>
</Row>
</div>
{
data.formItems.map((item, index) => {
return (
<FormItem groupInfo={item} />
)
})
}
{
data.iframeList.map((item, index) => {
return (
<IframeItem iframeInfo={item} />
)
})
}
</div> </div>
<div className='right-button'> <div className="gutter-row">
<Button className='item'>编辑人员</Button> <AnchorDetect
<Button className='item'>调动</Button> anchorList={data.anchorList}
<Button className='item'>离职</Button> container={window}
<Dropdown overlay={menu}> activity={this.state.activity}
<Button style={{ marginLeft: 8 }} className='item'> onChange={this.scrollToAnchor}
更多操作 <Icon type="down" /> />
</Button>
</Dropdown>
</div> </div>
</div> </div>
<div className='data'> <Spin size="large" tip="" className='scroll-spin' spinning={scrollLoading} />
<Row type="flex" justify="space-between" style={{height:'100%'}}> </WeaNewScrollPagination>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/workflow.png" alt="" />
<div>
<p>流程总数</p>
<p onClick={() => {window.open(`/spa/workflow/static/index.html#/main/workflow/listDoing?resourceid=${data.user.id}`)}}>{data.statistical.workflowCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/doc.png" alt="" />
<div>
<p>文档总数</p>
<p onClick={() => {window.open(`/spa/document/static/index.html#/main/document/search?viewcondition=2&doccreaterid=${data.user.id}`)}}>{data.statistical.docCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/custom.png" alt="" />
<div>
<p>我的客户</p>
<p onClick={() => {window.open(`/spa/crm/static/index.html#/main/crm/customer/hrmView?searchHrmId=${data.user.id}`)}}>{data.statistical.cusCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/cowork.png" alt="" />
<div>
<p>我的协作</p>
<p onClick={() => {window.open(`/spa/cowork/static/index.html#/main/cowork/hrmview?searchHrmid=${data.user.id}`)}}>{data.statistical.collaborationCount}</p>
</div>
</Col>
<Col className='ant-col' span={4}>
<img src="/hrm/hrm_e9/image/weibo.png" alt="" />
<div>
<p>微博总数</p>
<p onClick={() => {window.open(`/spa/blog/static/index.html#/user/${data.user.id}`)}}>{data.statistical.weiboCount}</p>
</div>
</Col>
</Row>
</div>
{
data.formItems.map((item,index)=>{
return(
<FormItem groupInfo={item}/>
)
})
}
{
iframeList.map((item,index) => {
return(
<IframeItem iframeInfo={item}/>
)
})
}
</div>
<div className="gutter-row">
<AnchorDetect
anchorList={data.anchorList}
container={window}
activity={this.state.activity}
onChange={this.scrollToAnchor}
/>
</div>
</div>
<Spin size="large" tip="" className='scroll-spin' spinning={scrollLoading} />
</WeaNewScrollPagination>
) )
} }

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-06-20 14:59:21 * @Date: 2022-06-20 14:59:21
* @LastEditTime: 2022-06-21 18:05:35 * @LastEditTime: 2022-10-18 11:18:05
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/resource/ResourceExtend.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/resource/ResourceExtend.js
*/ */
@ -159,23 +159,7 @@
key: 'save', key: 'save',
onClick: key => { onClick: key => {
this.saveEditCard(); this.saveEditCard();
} }
}, {
icon: <i className='icon-coms-go-back' />,
content: i18n.button.back(),
key: 'back',
onClick: key => {
this.backCard();
}
}]
} else {
arr = [{
icon: <i className='icon-coms-edit' />,
content: i18n.button.modify(),
key: 'editCard',
onClick: key => {
this.editCard();
}
} }
] ]
} }
@ -188,37 +172,19 @@
const { resourceExtend } = this.props; const { resourceExtend } = this.props;
const { isEditor, buttons } = resourceExtend; const { isEditor, buttons } = resourceExtend;
const save = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@pkes6y`} type="primary" onClick={this.saveEditCard} >{i18n.button.save()}</Button>; const save = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@pkes6y`} type="primary" onClick={this.saveEditCard} >{i18n.button.save()}</Button>;
const back = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@pl1fw8`} type="primary" onClick={this.backCard} >{i18n.button.back()}</Button>;
const edit = <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@vkeda5`} type="primary" onClick={this.editCard} >{i18n.button.modify()}</Button>;
const btns = []; const btns = [];
try { btns.push(save);
if (isEditor) {
if (buttons.hasSave) {
btns.push(save);
btns.push(back);
}
} else {
if (buttons.hasEdit) {
btns.push(edit);
}
}
} catch (e) { }
return btns; return btns;
} }
editCard = () => {
const { resourceExtend } = this.props;
resourceExtend.edit();
}
saveEditCard = () => { saveEditCard = () => {
const { resourceExtend } = this.props; const { resourceExtend } = this.props;
resourceExtend.save(); resourceExtend.save();
} }
backCard = () => {
this.init();
}
changeData(key) { changeData(key) {
const { const {

View File

@ -101,12 +101,22 @@ export default class Resource extends React.Component {
inputLeftDom={`<b>${i18n.label.organization()}</b>`} inputLeftDom={`<b>${i18n.label.organization()}</b>`}
treeNodeClick={this.treeNodeClick} treeNodeClick={this.treeNodeClick}
expandAllChildrenOnSearch={true} expandAllChildrenOnSearch={true}
renderNode={item => this.renderNode(item)}
/> />
) )
return tree; return tree;
} }
renderNode(item) {
return <div className='text-elli' title={item.name}>
<i className={item.icon} style={{ marginRight: '5px' }}></i>
{item.name}
{item.canceled && <span style={{ color: 'red' }}>({i18n.label.forbidden()})</span>}
</div>
}
getTopMenuBtns() { getTopMenuBtns() {
const { const {
resource resource
@ -192,42 +202,6 @@ export default class Resource extends React.Component {
datasImport.getImportForm(); datasImport.getImportForm();
} }
batchDelete() {
const {
resource
} = this.props;
const {
tableStore
} = resource;
let keys = toJS(tableStore.selectedRowKeys).toString();
resource.setIds(keys);
this.showConfirm('batchDel');
}
showConfirm(v) {
let _this = this;
confirm({
title: i18n.confirm.defaultTitle(),
content: (v == 'del') ? i18n.confirm.delete() : i18n.confirm.batchDeleteConfirm(),
okText: i18n.button.ok(),
cancelText: i18n.button.cancel(),
onOk() {
_this.onOk();
},
onCancel() {
return false;
},
});
}
onOk() {
const {
resource
} = this.props;
resource.delete();
}
getDropMenuDatas() { getDropMenuDatas() {
const { const {
resource resource
@ -309,50 +283,25 @@ export default class Resource extends React.Component {
if (c.dataIndex == 'last_name') { if (c.dataIndex == 'last_name') {
c.render = function (text, record) { c.render = function (text, record) {
return <a href='javascript:void(0);' onClick={() => { return <a href='javascript:void(0);' onClick={() => {
window.open(`/spa/organization/static/index.html#/main/organization/ResourceExtend/${record.id}`, "_blank") window.open(`/spa/organization/static/index.html#/main/organization/resourceCard/${record.id}`);
}}>{text}</a> }}>{text}</a>
} }
} }
}) })
} }
updateForbiddenTag(checked, id) {
const {
resource
} = this.props;
resource.updateForbiddenTag(checked, id);
}
onOperatesClick(record, rowIndex, operate) { onOperatesClick(record, rowIndex, operate) {
const { const {
index index
} = operate; } = operate;
(index == '0') && this.doEdit(record.randomFieldId); (index == '0') && this.view(record.randomFieldId);
(index == '1') && this.doDel(record.randomFieldId);
} }
doEdit(id) { view(id) {
const { window.open(`/spa/organization/static/index.html#/main/organization/resourceCard/${id}`);
resource
} = this.props;
resource.setNeDialogTitle(i18n.label.editRankScheme());
resource.setSchemeId(id);
resource.setIsNew(false);
resource.setVisible(true);
resource.getForm();
} }
doDel(id) {
const {
resource
} = this.props;
resource.setIds(id);
this.showConfirm('del');
}
handleSave() { handleSave() {
const { const {
resource resource
@ -426,8 +375,6 @@ export default class Resource extends React.Component {
} }
render() { render() {
const { const {
@ -495,7 +442,7 @@ export default class Resource extends React.Component {
conditionLen={3} conditionLen={3}
save={() => this.handleSave()} save={() => this.handleSave()}
onCancel={() => resource.setVisible(false)} onCancel={() => resource.setVisible(false)}
saveAndSetting={() => this.handleSaveAndSetting()} // saveAndSetting={() => this.handleSaveAndSetting()}
/> />
<DatasImport ecId={`${this && this.props && this.props.ecId || ''}_DatasImport@q4rrwm`} /> <DatasImport ecId={`${this && this.props && this.props.ecId || ''}_DatasImport@q4rrwm`} />
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -95,7 +95,7 @@ const Routes = (
<Route key="newImport" path="newImport" component={NewImport} /> <Route key="newImport" path="newImport" component={NewImport} />
<Route key="staffWorkflowSet" path="staffWorkflowSet" component={StaffWorkflowSet} /> <Route key="staffWorkflowSet" path="staffWorkflowSet" component={StaffWorkflowSet} />
<Route key="resourceBasicInfo" path="resourceBasicInfo" component={ResourceBasicInfo} /> <Route key="resourceBasicInfo" path="resourceBasicInfo" component={ResourceBasicInfo} />
<Route key="resourceCard" path="resourceCard" component={ResourceCard} /> <Route key="resourceCard" path="resourceCard/:id" component={ResourceCard} />
</Route> </Route>
); );

View File

@ -7,168 +7,210 @@ import * as Api from '../apis/resourceCard'; // 引入API接口文件
export class ResourceCardStore { export class ResourceCardStore {
@observable userid = '';
@observable height = 2000; @observable height = 2000;
@observable scrollLoading = true; @observable scrollLoading = false;
@observable offset = 20; @observable offset = 20;
@observable overtime = 1000; @observable overtime = 1000;
@observable intervalTime = 500; @observable intervalTime = 500;
@observable data = {};
@observable detectElements = [] // 受监控元素,可能存在空项
@observable flag = true; // 点击Anchor菜单项,不执行监听滚动事件
@action("初始化") init = () => { @action("初始化") init = () => {
//const { userid } = JSON.parse(localStorage.getItem("theme-account"));
this.getCardData();
} }
@action("获取卡片信息") getCardData = () => {
Api.getCardData(this.userid).then((res) => {
if (res.code === 200) {
this.setData(res.data)
this.buildDetectElements(res.data); //生成受监控元素
} else {
message.warning(res.msg);
}
}, error => {
message.warning(error.msg);
})
}
buildDetectElements = (data) => {
!this.isEmptyObject(data) && data.anchorList.map((item, index) => {
item.activity = index;
item.offset = document.getElementById(item.id).offsetTop + document.getElementById(item.id).clientHeight;
})
this.setDetectElements(data.anchorList);
}
isEmptyObject(obj) {
for (let key in obj) {
return false;
}
return true;
}
setData(value){
this.data = value;
}
setDetectElements(value) {
this.detectElements = value;
}
/************** json数据*****************/ /************** json数据*****************/
@observable data = { // @observable data = {
user: { // user: {
id:23, // id:23,
image: "", // image: "",
name: "萧言", // name: "萧言",
sex:"0", // sex:"0",
email: "1546584672@qq.com", // email: "1546584672@qq.com",
phone: "18822349878", // phone: "18822349878",
belongTo: "主账号", // belongTo: "主账号",
status: "正式" // status: "正式"
}, // },
statistical: { // statistical: {
workflowCount:190, // workflowCount:190,
docCount:134, // docCount:134,
cusCount:28, // cusCount:28,
collaborationCount:28, // collaborationCount:28,
weiboCount:166 // weiboCount:166
}, // },
formItems:[ // formItems:[
{ // {
id:'userInfo', // id:'userInfo',
title:'员工信息', // title:'员工信息',
items:[ // items:[
{ // {
fieldId:'姓名', // fieldId:'姓名',
fieldValue:'萧言' // fieldValue:'萧言'
},{ // },{
fieldId:'性别', // fieldId:'性别',
fieldValue:'男' // fieldValue:'男'
},{ // },{
fieldId:'出生日期', // fieldId:'出生日期',
fieldValue:'1987年9月1日' // fieldValue:'1987年9月1日'
},{ // },{
fieldId:'个人邮箱', // fieldId:'个人邮箱',
fieldValue:'1546875925@qq.com' // fieldValue:'1546875925@qq.com'
},{ // },{
fieldId:'电话号码', // fieldId:'电话号码',
fieldValue:'18925689752' // fieldValue:'18925689752'
},{ // },{
fieldId:'岗位级别', // fieldId:'岗位级别',
fieldValue:'-' // fieldValue:'-'
},{ // },{
fieldId:'职务信息', // fieldId:'职务信息',
fieldValue:'产品运营' // fieldValue:'产品运营'
} // }
] // ]
}, // },
{ // {
id:'workInfo', // id:'workInfo',
title:'工作信息', // title:'工作信息',
items:[ // items:[
{ // {
fieldId:'姓名', // fieldId:'姓名',
fieldValue:'萧言' // fieldValue:'萧言'
},{ // },{
fieldId:'性别', // fieldId:'性别',
fieldValue:'男' // fieldValue:'男'
},{ // },{
fieldId:'出生日期', // fieldId:'出生日期',
fieldValue:'1987年9月1日' // fieldValue:'1987年9月1日'
},{ // },{
fieldId:'个人邮箱', // fieldId:'个人邮箱',
fieldValue:'1546875925@qq.com' // fieldValue:'1546875925@qq.com'
},{ // },{
fieldId:'姓名', // fieldId:'姓名',
fieldValue:'萧言' // fieldValue:'萧言'
},{ // },{
fieldId:'性别', // fieldId:'性别',
fieldValue:'男' // fieldValue:'男'
},{ // },{
fieldId:'出生日期', // fieldId:'出生日期',
fieldValue:'1987年9月1日' // fieldValue:'1987年9月1日'
},{ // },{
fieldId:'个人邮箱', // fieldId:'个人邮箱',
fieldValue:'1546875925@qq.com' // fieldValue:'1546875925@qq.com'
},{ // },{
fieldId:'姓名', // fieldId:'姓名',
fieldValue:'萧言' // fieldValue:'萧言'
},{ // },{
fieldId:'性别', // fieldId:'性别',
fieldValue:'男' // fieldValue:'男'
},{ // },{
fieldId:'出生日期', // fieldId:'出生日期',
fieldValue:'1987年9月1日' // fieldValue:'1987年9月1日'
},{ // },{
fieldId:'个人邮箱', // fieldId:'个人邮箱',
fieldValue:'1546875925@qq.com' // fieldValue:'1546875925@qq.com'
} // }
] // ]
}, // },
{ // {
id:'educationInfo', // id:'educationInfo',
title:'教育经历', // title:'教育经历',
items:[ // items:[
{ // {
fieldId:'本科', // fieldId:'本科',
fieldValue:'南京大学' // fieldValue:'南京大学'
},{ // },{
fieldId:'研究生', // fieldId:'研究生',
fieldValue:'北京大学' // fieldValue:'北京大学'
},{ // },{
fieldId:'毕业时间', // fieldId:'毕业时间',
fieldValue:'1987-09-21' // fieldValue:'1987-09-21'
},{ // },{
fieldId:'获得奖项', // fieldId:'获得奖项',
fieldValue:'优秀毕业生' // fieldValue:'优秀毕业生'
},{ // },{
fieldId:'备注', // fieldId:'备注',
fieldValue:'无' // fieldValue:'无'
} // }
] // ]
} // }
], // ],
anchorList:[ // anchorList:[
{ // {
id:'userInfo', // id:'userInfo',
title:'员工信息' // title:'员工信息'
}, // },
{ // {
id:'workInfo', // id:'workInfo',
title:'工作信息' // title:'工作信息'
}, // },
{ // {
id:'educationInfo', // id:'educationInfo',
title:'教育经历' // title:'教育经历'
}, // },
{ // {
id:'comp', // id:'comp',
title:'分部扩展页' // title:'分部扩展页'
}, // },
{ // {
id:'dept', // id:'dept',
title:'部门扩展页' // title:'部门扩展页'
} // }
] // ],
// iframeList: [
// {
// id:"comp",
// title:"分部管理",
// url:'/spa/organization/static/index.html#/main/organization/companyExtend/7'
// },
// {
// id:"dept",
// title:"部门管理",
// url:'/spa/organization/static/index.html#/main/organization/company'
// },
// ]
} // }
@observable iframeList = [
{
id:"comp",
title:"分部管理",
url:'/spa/organization/static/index.html#/main/organization/companyExtend/7'
},
{
id:"dept",
title:"部门管理",
url:'/spa/organization/static/index.html#/main/organization/companyExtend/7'
},
]
} }

View File

@ -12,7 +12,7 @@ export class ResourceExtendStore {
@observable form = new WeaForm(); @observable form = new WeaForm();
@observable tableInfo = [] @observable tableInfo = []
@observable conditions = []; @observable conditions = [];
@observable isEditor = false; @observable isEditor = true;
@observable isNew = true; @observable isNew = true;
@observable loading = true; @observable loading = true;
@observable tabInfo = []; @observable tabInfo = [];
@ -48,7 +48,6 @@ export class ResourceExtendStore {
init = () => { init = () => {
this.detailSelectedKey = '0' this.detailSelectedKey = '0'
this.isEditor = false;
} }
save = () => { save = () => {
@ -86,9 +85,10 @@ export class ResourceExtendStore {
}).then(data => { }).then(data => {
if (data.code == 200) { if (data.code == 200) {
message.success(i18n.message.saveSuccess()); message.success(i18n.message.saveSuccess());
this.init(); window.location.href = `/spa/organization/static/index.html#/main/organization/resourceCard/${this.id}`;
this.getData(); // this.init();
this.selectedRowKeys = []; // this.getData();
// this.selectedRowKeys = [];
} else { } else {
message.warning(data.message); message.warning(data.message);
} }

View File

@ -136,7 +136,7 @@
height: 40px; height: 40px;
span:first-child{ span:first-child{
color: #999999; color: #999999;
width: 60px; width: 80px;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
} }
@ -171,7 +171,7 @@
} }
.content { .content {
width: 100%; width: 100%;
padding: 15px; padding: 15px;
} }
} }