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

北电科删除部分字段

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