提交 840dcb09 authored 作者: 姚鑫国's avatar 姚鑫国

4472 评奖评优模块功能优化

上级 ede21a8e
......@@ -5,25 +5,25 @@
*
* */
import { message, Modal } from 'antd';
import React, { useEffect, useState } from 'react';
import {message, Modal} from 'antd';
import React, {useEffect, useState} from 'react';
import * as service from '../publicApiService';
import * as destructionFunc from '../destruction';
import { Link } from 'dva/router';
import { getApplyPage } from '../publicApiService';
import { getToken } from '@/utils/authority';
import {Link} from 'dva/router';
import {getApplyPage} from '../publicApiService';
import {getToken} from '@/utils/authority';
import JustApply from './JustApply';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import List from './List';
import pageSetting from './pageSetting';
import ButtonDiy from '@/baseComponent/ButtonDiy';
import Shell from '@/baseComponent/Shell';
import { deepCopy, getIsBei_Dian } from '@/webPublic/zyd_public/utils/utils';
import {deepCopy, getIsBei_Dian} from '@/webPublic/zyd_public/utils/utils';
import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
import rebackButton from '@/webPublic/FormInsertDiy/AffairPage/ApplyPage/ReBackButton';
export default function index(props) {
const { state = {} } = props.location;
const {state = {}} = props.location;
const [show, setShow] = useState(false);
useEffect(
() => {
......@@ -48,7 +48,7 @@ class AffairPage extends React.Component {
constructor(props) {
super(props);
let pathname = this.props.location.pathname;
const { workId } = this.props;
const {workId} = this.props;
this.state = {
showIframe: false,
columns: [],
......@@ -76,11 +76,11 @@ class AffairPage extends React.Component {
if (typeof response.unifiedServicePatternModel === 'undefined') {
return false;
}
if(response.serviceId){
if (response.serviceId) {
this.getServiceDetail(response.serviceId);
}
destructionFunc.destructionGetDetail(response).then((x) => {
const { addFields, tableInfo, allConfigSetInfo } = x;
const {addFields, tableInfo, allConfigSetInfo} = x;
this.setState(
{
addFields,
......@@ -96,7 +96,7 @@ class AffairPage extends React.Component {
};
giveDetailColumns = () => {
const { columns, workId, dataBaseId, addFields } = this.state;
const {columns, workId, dataBaseId, addFields} = this.state;
const process_status = columns.find((x) => {
return x.name === 'process_status';
});
......@@ -123,7 +123,7 @@ class AffairPage extends React.Component {
addFields,
},
}}>
{record.statusName === "重新提交" ? "去提交" : "详情" }
{["reject", "re_apply", "un_audit"].includes(record?.hisTaskListData?.formStatusId) ? "去提交" : "详情"}
</Link>
);
},
......@@ -136,8 +136,8 @@ class AffairPage extends React.Component {
};
handleButtonSet = () => {
const { canApply, otherButtons = [] } = this.props;
const { allConfigSetInfo, serviceInfo } = this.state;
const {canApply, otherButtons = []} = this.props;
const {allConfigSetInfo, serviceInfo} = this.state;
if (!allConfigSetInfo) {
return [];
}
......@@ -158,7 +158,8 @@ class AffairPage extends React.Component {
showIframe: true,
renderIframe: true,
},
() => {},
() => {
},
);
},
},
......@@ -168,8 +169,8 @@ class AffairPage extends React.Component {
};
handleSearchSet = () => {
const { columns, searchCondition } = this.state;
const { onResponse } = this.props;
const {columns, searchCondition} = this.state;
const {onResponse} = this.props;
const pageSearch = {
search: {
field: {},
......@@ -197,7 +198,7 @@ class AffairPage extends React.Component {
};
getColumns = () => {
const { workId } = this.state;
const {workId} = this.state;
service.getColumns(workId).then((response) => {
if (response && Array.isArray(response)) {
response = response.filter((x) => {
......@@ -223,8 +224,8 @@ class AffairPage extends React.Component {
message.error('您的数据未同步,请联系管理员!');
return false;
}
const { pathname } = this.state;
const { dataBaseId, workId, iframeHeight } = this.props;
const {pathname} = this.state;
const {dataBaseId, workId, iframeHeight} = this.props;
if (dataBaseId || workId) {
this.setState(
{
......@@ -280,7 +281,7 @@ class AffairPage extends React.Component {
}
returnList = (needSearchList = false) => {
const { workId } = this.state;
const {workId} = this.state;
this.setState(
{
renderIframe: false,
......@@ -300,7 +301,7 @@ class AffairPage extends React.Component {
};
render() {
const { iframeUrlDiy } = this.props;
const {iframeUrlDiy} = this.props;
const {
workId,
dataBaseId,
......@@ -380,7 +381,7 @@ class AffairPage extends React.Component {
) : (
<ApplyForZyd {...this.props}
returnList={this.returnList}
id={workId === '1549319936277479424' ? '1590627747913269248' : workId} />
id={workId === '1549319936277479424' ? '1590627747913269248' : workId}/>
/* 姚鑫国说的 北电科违纪要用另外一个id发起 2022年11月10日 */
)
) : null}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论