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

4472 评奖评优模块功能优化

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