resolve
This commit is contained in:
parent
faf2782dba
commit
72263eb5f7
|
|
@ -43,10 +43,6 @@ export const version = (params) => {
|
|||
return WeaTools.callApi('/api/bs/hrmorganization/version/resourcefielddefined/save', 'POST', params);
|
||||
}
|
||||
|
||||
export const selectVersions = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/version/resourcefielddefined/getVersion', 'GET', params);
|
||||
}
|
||||
|
||||
export const exportResource = (ids) => {
|
||||
fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).then(res => res.blob().then(blob => {
|
||||
var filename=`人员档案.xlsx`
|
||||
|
|
|
|||
|
|
@ -6,3 +6,8 @@ import {
|
|||
export const getCardData = (id) => {
|
||||
return WeaTools.callApi(`/api/bs/hrmorganization/personnelcard/getPersonnelCard?id=${id}`, 'GET');
|
||||
}
|
||||
|
||||
|
||||
export const selectVersions = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/version/resourcefielddefined/getVersion', 'GET', params);
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-05-18 16:23:32
|
||||
* @LastEditTime: 2022-12-14 13:54:24
|
||||
* @LastEditTime: 2022-12-16 15:45:59
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
||||
*/
|
||||
|
|
@ -615,7 +615,7 @@ export default class Company extends React.Component {
|
|||
isFormInit={form1.isFormInit}
|
||||
loading={dialogLoading}
|
||||
isEdit={isEdit}
|
||||
height={380}
|
||||
height={350}
|
||||
conditionLen={1}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => company.setNewVisible(false)}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-06-02 09:19:37
|
||||
* @LastEditTime: 2022-12-14 14:03:50
|
||||
* @LastEditTime: 2022-12-16 15:45:48
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
||||
*/
|
||||
|
|
@ -724,7 +724,7 @@ export default class Department extends React.Component {
|
|||
isFormInit={form1.isFormInit}
|
||||
loading={confirmLoading}
|
||||
height={100}
|
||||
width={400}
|
||||
width={350}
|
||||
isMerge={isMerge}
|
||||
defaultValue={"0"}
|
||||
save={() => this.PopconfirmSave()}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-06-02 09:20:03
|
||||
* @LastEditTime: 2022-12-15 19:28:54
|
||||
* @LastEditTime: 2022-12-16 11:18:42
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/departmentExtend.js
|
||||
*/
|
||||
|
|
@ -46,6 +46,11 @@ export default class DepartmentExtendStore extends React.Component {
|
|||
departmentExtend.selectVersions();
|
||||
}
|
||||
|
||||
onClose = () => {
|
||||
const { departmentExtend } = this.props;
|
||||
departmentExtend.open = false;
|
||||
}
|
||||
|
||||
getTabChildren = () => {
|
||||
const { departmentExtend } = this.props;
|
||||
let { tableInfo, isEditor, tabkey, onRowSelect, selectedRowKeys, detailSelectedKey } = departmentExtend;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ export default class FormItem extends React.Component {
|
|||
<span>{subItem.fieldId}</span>
|
||||
{subItem.fieldValue.length > 10 ? <Tooltip placement="topLeft" title={subItem.fieldValue}>
|
||||
<span>{subItem.fieldValue}</span>
|
||||
</Tooltip> : <span dangerouslySetInnerHTML={subItem.fieldValue}></span>}
|
||||
</Tooltip> : <span>{subItem.fieldValue}</span>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ import {
|
|||
WeaFormItem,
|
||||
WeaRightMenu,
|
||||
WeaAlertPage,
|
||||
WeaNewScrollPagination
|
||||
WeaNewScrollPagination,
|
||||
WeaSlideModal
|
||||
} from 'ecCom'
|
||||
import {
|
||||
Row,
|
||||
|
|
@ -36,6 +37,9 @@ import FormItem from './FormItem';
|
|||
import IframeItem from './IframeItem';
|
||||
import AnchorDetect from './AnchorDetect';
|
||||
import { renderNoright } from '../../util'; // 从util文件引入公共的方法
|
||||
import VersionsSlider from '../VersionsSlider';
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
|
||||
|
||||
const toJS = mobx.toJS;
|
||||
const confirm = Modal.confirm;
|
||||
|
|
@ -133,6 +137,16 @@ export default class ResourceCard extends React.Component {
|
|||
window.open(e.item.props.url,"_blank")
|
||||
}
|
||||
|
||||
view = () => {
|
||||
const { resourceCard } = this.props;
|
||||
resourceCard.selectVersions();
|
||||
}
|
||||
|
||||
onClose = () => {
|
||||
const { resourceCard } = this.props;
|
||||
resourceCard.open = false;
|
||||
}
|
||||
|
||||
onScroll = (event) => {
|
||||
const {
|
||||
resourceCard
|
||||
|
|
@ -188,7 +202,9 @@ export default class ResourceCard extends React.Component {
|
|||
offset,
|
||||
overtime,
|
||||
intervalTime,
|
||||
data
|
||||
data,
|
||||
versionList,
|
||||
open
|
||||
} = resourceCard;
|
||||
const menu = (
|
||||
<Menu onClick={this.handleMenuClick}>
|
||||
|
|
@ -238,6 +254,7 @@ export default class ResourceCard extends React.Component {
|
|||
</div>
|
||||
</div>
|
||||
<div className='right-button'>
|
||||
<Button className='item' onClick={this.view} >{i18n.button.version()}</Button>
|
||||
{
|
||||
data.buttons.slice(0,3).map((item,index) => {
|
||||
return (
|
||||
|
|
@ -319,6 +336,15 @@ export default class ResourceCard extends React.Component {
|
|||
</div>
|
||||
</div>
|
||||
<Spin size="large" tip="" className='scroll-spin' spinning={scrollLoading} />
|
||||
<WeaSlideModal visible={open}
|
||||
// top={6}
|
||||
width={40}
|
||||
height={100}
|
||||
direction={'right'}
|
||||
measure={'%'}
|
||||
content={!isEmpty(versionList) ? <VersionsSlider versionList={versionList} handleChange={val => departmentExtend.changeVersion(val)}/> : <div style={{"textAlign":"center","color":"red","fontSize":"20px","marginTop": "50px"}}> 暂无历史版本 </div>}
|
||||
onClose={this.onClose}
|
||||
onAnimationEnd={() => console.log('onAnimationEnd')} />
|
||||
</WeaNewScrollPagination>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,8 @@ export class DepartmentExtendStore {
|
|||
}
|
||||
|
||||
changeVersion = data => {
|
||||
debugger
|
||||
this.version = data;
|
||||
this.selectVersions();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ export class ResourceCardStore {
|
|||
@observable detectElements = [] // 受监控元素,可能存在空项
|
||||
@observable flag = true; // 点击Anchor菜单项,不执行监听滚动事件
|
||||
|
||||
@observable open = false;
|
||||
@observable version = '1.0';
|
||||
@observable versionList = {};
|
||||
|
||||
@action("初始化") init = () => {
|
||||
//const { userid } = JSON.parse(localStorage.getItem("theme-account"));
|
||||
this.getCardData();
|
||||
|
|
@ -36,6 +40,23 @@ export class ResourceCardStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("历史版本") selectVersions = () => {
|
||||
let params = {
|
||||
id:this.userid,
|
||||
version:this.version
|
||||
}
|
||||
Api.selectVersions(params).then((res) => {
|
||||
this.open = true;
|
||||
if (res.code === 200) {
|
||||
this.setVersionList(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;
|
||||
|
|
@ -51,6 +72,11 @@ export class ResourceCardStore {
|
|||
return true;
|
||||
}
|
||||
|
||||
changeVersion = data => {
|
||||
this.version = data;
|
||||
this.selectVersions();
|
||||
}
|
||||
|
||||
|
||||
setData(value){
|
||||
this.data = value;
|
||||
|
|
@ -60,6 +86,10 @@ export class ResourceCardStore {
|
|||
setDetectElements(value) {
|
||||
this.detectElements = value;
|
||||
}
|
||||
|
||||
setVersionList(obj) {
|
||||
this.versionList = obj;
|
||||
}
|
||||
/************** json数据*****************/
|
||||
// @observable data = {
|
||||
// buttons:[
|
||||
|
|
|
|||
Loading…
Reference in New Issue