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