禅道bug的修复
This commit is contained in:
parent
aa7ec55294
commit
216f8c8b93
|
|
@ -400,18 +400,21 @@ class Index extends Component {
|
|||
const { pageInfo, selectedKey } = this.state;
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
let columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true");
|
||||
return _.map([{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
align: "left",
|
||||
oldWidth: 60,
|
||||
render: (text, record, index) => {
|
||||
const { current, pageSize } = pageInfo;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
}
|
||||
}, ...columns], (item, index) => {
|
||||
return _.map([
|
||||
// {
|
||||
// title: "序号",
|
||||
// dataIndex: "index",
|
||||
// align: "left",
|
||||
// oldWidth: 60,
|
||||
// render: (text, record, index) => {
|
||||
// const { current, pageSize } = pageInfo;
|
||||
// return (current - 1) * pageSize + index + 1;
|
||||
// }
|
||||
// },
|
||||
...columns], (item, index) => {
|
||||
if (index === 0) {
|
||||
return { ...item, width: item.oldWidth, fixed: "left" };
|
||||
// , fixed: "left"
|
||||
return { ...item, width: item.oldWidth };
|
||||
}
|
||||
if (item.dataIndex === "operate") {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -168,38 +168,51 @@ class Index extends Component {
|
|||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if(!isSuccess){
|
||||
if (!isSuccess) {
|
||||
message.error(errormsg || msg || "保存失败!");
|
||||
return
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
progressVisible: true,
|
||||
progress: 0
|
||||
}, () => {
|
||||
let number=1 ;
|
||||
let number = 1;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => {
|
||||
const { progress_statue }= data;
|
||||
API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
const { progress_statue } = data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
progress: 100,
|
||||
},()=>{
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
})
|
||||
});
|
||||
message.success("保存成功");
|
||||
} else if(progress_statue === "in_progress" && this.timer){
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, ()=> number++ );
|
||||
}else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
} else if (progress_statue === "in_progress" && this.timer) {
|
||||
if (this.state.progress === 90) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 90/100
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, () => number++);
|
||||
}
|
||||
} else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
progress: 100,
|
||||
},()=>{
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
})
|
||||
});
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
|
|
@ -257,7 +270,8 @@ class Index extends Component {
|
|||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>人员校验规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")} loading={loading.employee}>保存</Button>
|
||||
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}
|
||||
loading={loading.employee}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={importItems}/>
|
||||
<WeaSearchGroup
|
||||
|
|
|
|||
Loading…
Reference in New Issue