提交 5a24c0f9 authored 作者: 钟是志's avatar 钟是志

29029 全系统所有审核页面,待处理-操作-为”审核“;已处理-操作-为”详情“(admin,cdzysoft@654321)

上级 10b0c5be
...@@ -13,201 +13,183 @@ import { Link } from 'dva/router'; ...@@ -13,201 +13,183 @@ import { Link } from 'dva/router';
import { CreateC } from '../../ExportComponent/ActiveMenuComponent'; import { CreateC } from '../../ExportComponent/ActiveMenuComponent';
class Index extends React.Component { class Index extends React.Component {
static defaultProps = { static defaultProps = {
hasBatchAudit: false, // 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志 hasBatchAudit: false, // 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志
batchAuditButtonName: '批量审核', // 如果需要批量审核 则直接用 BatchAudit.js 文件 batchAuditButtonName: '批量审核', // 如果需要批量审核 则直接用 BatchAudit.js 文件
}; };
constructor(props) { constructor(props) {
super(props); super(props);
let pathname = this.props.location.pathname; let pathname = this.props.location.pathname;
this.state = { this.state = {
columns: [], columns: [],
dataList: [], dataList: [],
headerInfo: [], headerInfo: [],
workId: this.props.workId || '', workId: this.props.workId || '',
searchCondition: [], searchCondition: [],
pathname, pathname,
dataBaseId: this.props.dataBaseId || '', dataBaseId: this.props.dataBaseId || '',
addCondition: [], addCondition: [],
addFields: [], // 新增时填写的字段。 addFields: [], // 新增时填写的字段。
tableInfo: {}, // 表格配置属性 tableInfo: {}, // 表格配置属性
allConfigSetInfo: {}, // 返回的数据 allConfigSetInfo: {}, // 返回的数据
}; };
window.callbackSubmitInfoZhiYong = undefined; window.callbackSubmitInfoZhiYong = undefined;
} }
getFormDetail = (workId) => { getFormDetail = (workId) => {
const { dataBaseId } = this.state; const { dataBaseId } = this.state;
service.getFormDetail(workId) service.getFormDetail(workId).then((response) => {
.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, searchCondition } = x;
.then((x) => { this.setState(
const { {
addFields, addFields,
tableInfo, tableInfo,
allConfigSetInfo, searchCondition,
searchCondition allConfigSetInfo,
} = x; },
this.setState( () => {
{ this.giveDetailColumns();
addFields, },
tableInfo, );
searchCondition, });
allConfigSetInfo, });
}, };
() => {
this.giveDetailColumns();
},
);
});
});
};
giveDetailColumns = () => { giveDetailColumns = () => {
const { const { columns, workId, dataBaseId, addFields, tableInfo } = this.state;
columns, const { showPrint, routerConfig } = this.props;
workId, const process_status = columns.find((x) => {
dataBaseId, return x.name === 'process_status';
addFields, });
tableInfo if (process_status && process_status.dataIndex) {
} = this.state; process_status.render = (text, record) => {
const { showPrint, routerConfig } = this.props; return record.statusName || record[process_status.dataIndex];
const process_status = columns.find((x) => { };
return x.name === 'process_status'; }
}); columns.push({
if (process_status && process_status.dataIndex) { dataIndex: 'operationDiy',
process_status.render = (text, record) => { title: '操作',
return record.statusName || record[process_status.dataIndex]; fixed: 'right',
}; render: (text, record) => {
} return (
columns.push({ <Link
dataIndex: 'operation', to={{
title: '操作', pathname: './Detail',
// fixed: columns.length > 12 ? 'right' : false, state: {
fixed: 'right', workId,
render: (text, record) => { dataBaseId,
return ( record,
<Link addFields,
to={{ tableInfo,
pathname: './Detail', showPrint: showPrint || routerConfig.showPrint === '1',
state: { },
workId, }}>
dataBaseId, {text || '详情'}
record, </Link>
addFields, );
tableInfo, },
showPrint: showPrint || routerConfig.showPrint === '1', });
}, this.setState({
}}> columns,
详情 });
</Link> };
);
},
});
this.setState({
columns,
});
};
getColumn = () => { getColumn = () => {
const { workId } = this.state; const { workId } = this.state;
service.getColumns(workId) service.getColumns(workId).then((response) => {
.then((response) => { if (!response || !Array.isArray(response)) {
if (!response || !Array.isArray(response)) { response = [];
response = []; }
} // console.log('columns', response);
// console.log('columns', response); for (let item of response) {
for (let item of response) { if (item.dataIndex === 'taskName' && !item.width) {
if (item.dataIndex === 'taskName' && !item.width) { item.width = 200;
item.width = 200; }
} if (item.dataIndex === 'createTime' && !item.width) {
if (item.dataIndex === 'createTime' && !item.width) { item.width = 200;
item.width = 200; }
} }
} response = response.filter((x) => {
response = response.filter((x) => { return x.title !== '流程进度';
return x.title !== '流程进度'; });
}); if (response && response.length) {
if (response && response.length) { this.setState(
this.setState( {
{ columns: response, // 表头
columns: response, // 表头 },
}, () => {
() => { this.getFormDetail(workId);
this.getFormDetail(workId); },
}, );
); }
} });
}); };
};
componentDidMount() { componentDidMount() {
const { pathname } = this.state; const { pathname } = this.state;
const { workId } = this.state; const { workId } = this.state;
if (workId) { if (workId) {
this.getColumn(); this.getColumn();
} else { } else {
service.getId(pathname) service.getId(pathname).then((x) => {
.then((x) => { this.setState(
this.setState( {
{ workId: x.workId,
workId: x.workId, dataBaseId: x.dataBaseId,
dataBaseId: x.dataBaseId, },
}, () => {
() => { this.getColumn();
this.getColumn(); },
}, );
); });
}); }
} }
}
render() { render() {
const { const {
workId, workId,
dataBaseId, dataBaseId,
columns, columns,
searchCondition, searchCondition,
addFields, addFields,
allConfigSetInfo, allConfigSetInfo,
tableInfo, tableInfo,
} = this.state; } = this.state;
const { const {
hasBatchAudit, hasBatchAudit,
batchAuditButtonName, batchAuditButtonName,
showPrint, showPrint,
noNeedForm, noNeedForm,
tab2Buttons = [] tab2Buttons = [],
} = this.props; } = this.props;
if (!workId) { if (!workId) {
return null; return null;
} }
return ( return (
<AuditPage <AuditPage
hasBatchAudit={hasBatchAudit} hasBatchAudit={hasBatchAudit}
workId={workId} workId={workId}
dataBaseId={dataBaseId} dataBaseId={dataBaseId}
columns={columns} columns={columns}
addFields={addFields} addFields={addFields}
tableInfo={tableInfo} tableInfo={tableInfo}
allConfigSetInfo={allConfigSetInfo} allConfigSetInfo={allConfigSetInfo}
searchCondition={searchCondition} searchCondition={searchCondition}
batchAuditButtonName={batchAuditButtonName} batchAuditButtonName={batchAuditButtonName}
showPrint={showPrint} showPrint={showPrint}
noNeedForm={noNeedForm} noNeedForm={noNeedForm}
tab2Buttons={tab2Buttons} tab2Buttons={tab2Buttons}
/> />
); );
} }
} }
export default function Pr(props) { export default function Pr(props) {
const { routerConfig } = useContext(CreateC); const { routerConfig } = useContext(CreateC);
return ( return <Index {...props} routerConfig={routerConfig} />;
<Index {...props} routerConfig={routerConfig}/>
);
} }
...@@ -189,6 +189,11 @@ const getDetailInfo = (id) => { ...@@ -189,6 +189,11 @@ const getDetailInfo = (id) => {
* */ * */
const getWaitPage = (info) => { const getWaitPage = (info) => {
return apiRequest('/UnifiedAppFormApi/getWaitPage', info).then((x) => { return apiRequest('/UnifiedAppFormApi/getWaitPage', info).then((x) => {
if(x && x.rows){
for(let item of x.rows){
item.operationDiy = '审核';
}
}
return giveValue(x); return giveValue(x);
}); });
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论