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

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

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