提交 736022d4 authored 作者: 钟是志's avatar 钟是志

禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152

上级 adf21efd
......@@ -11,6 +11,8 @@ import AuditPage from './AuditPage';
import * as destructionFunc from '../destruction';
import { Link } from 'dva/router';
import CreateC from '../../ExportComponent/ContextCreate';
import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo';
class Index extends React.Component {
static defaultProps = {
......@@ -39,19 +41,13 @@ class Index extends React.Component {
getFormDetail = (workId) => {
const { dataBaseId } = this.state;
service.getFormDetail(workId)
.then((response) => {
service.getFormDetail(workId).then((response) => {
console.log(response);
if (typeof response.unifiedServicePatternModel === 'undefined') {
return false;
}
destructionFunc.destructionGetDetail(response, workId)
.then((x) => {
const {
addFields,
tableInfo,
allConfigSetInfo,
searchCondition,
} = x;
destructionFunc.destructionGetDetail(response, workId).then((x) => {
const { addFields, tableInfo, allConfigSetInfo, searchCondition } = x;
this.setState(
{
addFields,
......@@ -68,17 +64,8 @@ class Index extends React.Component {
};
giveDetailColumns = () => {
const {
columns,
workId,
dataBaseId,
addFields,
tableInfo
} = this.state;
const {
showPrint,
routerConfig
} = this.props;
const { columns, workId, dataBaseId, addFields, tableInfo } = this.state;
const { showPrint, routerConfig } = this.props;
const process_status = columns.find((x) => {
return x.name === 'process_status';
});
......@@ -117,8 +104,7 @@ class Index extends React.Component {
getColumn = () => {
const { workId } = this.state;
service.getColumns(workId)
.then((response) => {
service.getColumns(workId).then((response) => {
if (!response || !Array.isArray(response)) {
response = [];
}
......@@ -153,8 +139,7 @@ class Index extends React.Component {
if (workId) {
this.getColumn();
} else {
service.getId(pathname)
.then((x) => {
service.getId(pathname).then((x) => {
this.setState(
{
workId: x.workId,
......@@ -178,17 +163,29 @@ class Index extends React.Component {
allConfigSetInfo,
tableInfo,
} = this.state;
const {
hasBatchAudit,
batchAuditButtonName,
showPrint,
noNeedForm,
tab2Buttons = [],
} = this.props;
const { hasBatchAudit, batchAuditButtonName, showPrint, noNeedForm } = this.props;
if (!workId) {
return null;
}
if (Array.isArray(columns)){
const tab2Buttons = [];
if (window.zdyTableTemplateWillMountProps?.auditTab2ButtonsExport) {
tab2Buttons.push({
type: 'export',
name: '导出',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
exportHandledInfo({
columns,
appId: workId,
handled: 'handled',
});
},
}); // 解决禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152
}
if (Array.isArray(columns)) {
let d = [];
for (let item of columns) {
if (item.dataIndex !== 'operationDiy') {
......@@ -222,5 +219,5 @@ class Index extends React.Component {
export default function Pr(props) {
const { routerConfig } = useContext(CreateC);
// console.log(routerConfig);
return <Index {...props} routerConfig={routerConfig}/>;
return <Index {...props} routerConfig={routerConfig} />;
}
......@@ -8,6 +8,7 @@
import { apiRequest } from '../request';
import { getOneStopConfig, isJSON } from '@/baseComponent/utils';
import { getHistoryFormDetail } from '@/webPublic/Services';
import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
const giveValue = (x) => {
if (x && x.rows) {
......@@ -141,6 +142,8 @@ const getFormDetail = (id) => {
} else {
return {};
}
}).then((res) => {
return prepareShow(res);
});
};
......
......@@ -88,24 +88,26 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
Res = <Audit workId={appId} {...otherProps} />;
break;
case 'BatchAudit': // 批量审批
if(appId === '1492048888356405248' && getIsQian_Nan() || process.env.NODE_ENV === 'development'){
// 禅道30031
otherProps.tab2Buttons = [
{
type: 'export',
name: '导出',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
exportHandledInfo({
columns,
appId,
handled: 'handled',
});
},
},
];
}
Res = <BatchAudit workId={appId} {...otherProps} />;
// if(appId === '1492048888356405248' && getIsQian_Nan() || process.env.NODE_ENV === 'development'){
// // 禅道30031
// otherProps.tab2Buttons = [
// {
// type: 'export',
// name: '导出',
// component: 'Normal',
// handleClick: (selectRows, formValues, getPage, search, columns) => {
// exportHandledInfo({
// columns,
// appId,
// handled: 'handled',
// });
// },
// },
// ];
// }
Res = <BatchAudit workId={appId} {...otherProps}
workId={'1492048888356405248'}
/>;
break;
case 'AuditMerage': // 审核页面聚合 多个流程的审核页面放在一起
Res = <AuditMerge {...otherProps} routerConfig={routerConfig}/>;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论