提交 3ca2ad82 authored 作者: 钟是志's avatar 钟是志

北电科删除部分字段

上级 018d04be
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* */ * */
import { message } from 'antd'; import { message } from 'antd';
import React 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';
...@@ -24,6 +24,17 @@ import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index'; ...@@ -24,6 +24,17 @@ import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
export default function index(props) { export default function index(props) {
const { state = {} } = props.location; const { state = {} } = props.location;
const [show, setShow] = useState(false);
useEffect(() => {
setShow(false);
setTimeout(() => {
setShow(true);
}, 100);
}, [props.location.pathname]);
if(!show){
return null;
}
if (state.justApply) { if (state.justApply) {
return <JustApply {...props} />; return <JustApply {...props} />;
} else { } else {
...@@ -35,7 +46,10 @@ class AffairPage extends React.Component { ...@@ -35,7 +46,10 @@ 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 { dataBaseId, workId } = this.props; const {
dataBaseId,
workId
} = this.props;
this.state = { this.state = {
showIframe: false, showIframe: false,
columns: [], columns: [],
...@@ -50,12 +64,18 @@ class AffairPage extends React.Component { ...@@ -50,12 +64,18 @@ class AffairPage extends React.Component {
} }
getFormDetail = (workId) => { getFormDetail = (workId) => {
service.getFormDetail(workId).then((response) => { service.getFormDetail(workId)
.then((response) => {
if (typeof response.unifiedServicePatternModel === 'undefined') { if (typeof response.unifiedServicePatternModel === 'undefined') {
return false; return false;
} }
destructionFunc.destructionGetDetail(response).then((x) => { destructionFunc.destructionGetDetail(response)
const { addFields, tableInfo, allConfigSetInfo } = x; .then((x) => {
const {
addFields,
tableInfo,
allConfigSetInfo
} = x;
this.setState( this.setState(
{ {
addFields, addFields,
...@@ -71,7 +91,12 @@ class AffairPage extends React.Component { ...@@ -71,7 +91,12 @@ 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';
}); });
...@@ -81,7 +106,7 @@ class AffairPage extends React.Component { ...@@ -81,7 +106,7 @@ class AffairPage extends React.Component {
}; };
} }
let findCz = columns.find((g) => g.dataIndex === 'operation'); let findCz = columns.find((g) => g.dataIndex === 'operation');
if(!findCz){ if (!findCz) {
columns.push({ columns.push({
dataIndex: 'operation', dataIndex: 'operation',
title: '操作', title: '操作',
...@@ -107,15 +132,16 @@ class AffairPage extends React.Component { ...@@ -107,15 +132,16 @@ class AffairPage extends React.Component {
} }
this.setState({ this.setState({
columns, columns,
}); });
}; };
handleButtonSet = () => { handleButtonSet = () => {
const { canApply, otherButtons = [] } = this.props; const {
canApply,
otherButtons = []
} = this.props;
const { allConfigSetInfo } = this.state; const { allConfigSetInfo } = this.state;
if (!allConfigSetInfo) { if (!allConfigSetInfo) {
return []; return [];
...@@ -137,7 +163,8 @@ class AffairPage extends React.Component { ...@@ -137,7 +163,8 @@ class AffairPage extends React.Component {
showIframe: true, showIframe: true,
renderIframe: true, renderIframe: true,
}, },
() => {}, () => {
},
); );
}, },
}, },
...@@ -146,7 +173,10 @@ class AffairPage extends React.Component { ...@@ -146,7 +173,10 @@ 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: {
...@@ -159,8 +189,14 @@ class AffairPage extends React.Component { ...@@ -159,8 +189,14 @@ class AffairPage extends React.Component {
return response; return response;
}, },
condition: searchCondition, condition: searchCondition,
nameSpan: { big: 8, small: 9 }, nameSpan: {
fileSpan: { big: 4, small: 4 }, big: 8,
small: 9
},
fileSpan: {
big: 4,
small: 4
},
}, },
tableRowKey: 'id', tableRowKey: 'id',
columns, columns,
...@@ -170,8 +206,9 @@ class AffairPage extends React.Component { ...@@ -170,8 +206,9 @@ class AffairPage extends React.Component {
getColumns = () => { getColumns = () => {
const { workId } = this.state; const { workId } = this.state;
service.getColumns(workId).then((response) => { service.getColumns(workId)
if(response && Array.isArray(response)){ .then((response) => {
if (response && Array.isArray(response)) {
response = response.filter((x) => { response = response.filter((x) => {
return x.title !== '流程进度'; return x.title !== '流程进度';
}); });
...@@ -197,7 +234,11 @@ class AffairPage extends React.Component { ...@@ -197,7 +234,11 @@ class AffairPage extends React.Component {
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(
{ {
...@@ -209,7 +250,8 @@ class AffairPage extends React.Component { ...@@ -209,7 +250,8 @@ class AffairPage extends React.Component {
}, },
); );
} else { } else {
service.getId(pathname).then((x) => { service.getId(pathname)
.then((x) => {
this.setState( this.setState(
{ {
workId: x.workId, workId: x.workId,
...@@ -241,14 +283,14 @@ class AffairPage extends React.Component { ...@@ -241,14 +283,14 @@ class AffairPage extends React.Component {
); );
return true; return true;
} };
componentDidMount() { componentDidMount() {
this.initData(); this.initData();
} }
componentDidUpdate(prevProps, prevState) { componentDidUpdate(prevProps, prevState) {
if(prevProps.workId !== this.props.workId){ if (prevProps.workId !== this.props.workId) {
// console.log('123123', prevProps, this.props); // console.log('123123', prevProps, this.props);
this.initData(); this.initData();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论