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

23704 学工通用流程审批界面新增支持流程节点下查询

上级 78f60e0b
...@@ -61,7 +61,7 @@ export default class AuditPage extends Component { ...@@ -61,7 +61,7 @@ export default class AuditPage extends Component {
}; };
handleSearchSet = () => { handleSearchSet = () => {
const { columns, searchCondition } = this.props; const { columns, searchCondition, allConfigSetInfo } = this.props;
console.log(searchCondition); console.log(searchCondition);
const tab1 = { const tab1 = {
search: { search: {
...@@ -71,7 +71,7 @@ export default class AuditPage extends Component { ...@@ -71,7 +71,7 @@ export default class AuditPage extends Component {
beforeSearchData: (data) => { beforeSearchData: (data) => {
let searcherKeyValue = {}; let searcherKeyValue = {};
for (let item of searchCondition) { for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined') { if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') {
searcherKeyValue[item.base52] = data[item.key]; searcherKeyValue[item.base52] = data[item.key];
} }
} }
...@@ -83,7 +83,13 @@ export default class AuditPage extends Component { ...@@ -83,7 +83,13 @@ export default class AuditPage extends Component {
responseCallBack: (response) => { responseCallBack: (response) => {
return response; return response;
}, },
condition: searchCondition, condition: searchCondition.filter((g) => {
if(!allConfigSetInfo.isShowWaitTaskDef){
return g.key !== 'taskDefKey';
}else{
return true;
}
}),
nameSpan: { big: 8, small: 9 }, nameSpan: { big: 8, small: 9 },
fileSpan: { big: 4, small: 4 }, fileSpan: { big: 4, small: 4 },
}, },
...@@ -101,7 +107,7 @@ export default class AuditPage extends Component { ...@@ -101,7 +107,7 @@ export default class AuditPage extends Component {
beforeSearchData: (data) => { beforeSearchData: (data) => {
let searcherKeyValue = {}; let searcherKeyValue = {};
for (let item of searchCondition) { for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined') { if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') {
searcherKeyValue[item.base52] = data[item.key]; searcherKeyValue[item.base52] = data[item.key];
} }
} }
...@@ -110,7 +116,13 @@ export default class AuditPage extends Component { ...@@ -110,7 +116,13 @@ export default class AuditPage extends Component {
} }
return data; return data;
}, },
condition: searchCondition, condition: searchCondition.filter((g) => {
if(!allConfigSetInfo.isShowHandledTaskDef){
return g.key !== 'taskDefKey';
}else{
return true;
}
}),
nameSpan: { big: 8, small: 9 }, nameSpan: { big: 8, small: 9 },
fileSpan: { big: 4, small: 4 }, fileSpan: { big: 4, small: 4 },
}, },
......
...@@ -5,6 +5,7 @@ import config from '@/config/config'; ...@@ -5,6 +5,7 @@ import config from '@/config/config';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import moment from 'moment'; import moment from 'moment';
import React from 'react'; import React from 'react';
import { findListTaskDefinition } from '@/webPublic/FormInsertDiy/AffairPage/publicApiService';
const handleSqlModels = (sqlModels, defaultValues) => { const handleSqlModels = (sqlModels, defaultValues) => {
if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) { if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) {
...@@ -283,13 +284,31 @@ export async function destructionGetDetail(response) { ...@@ -283,13 +284,31 @@ export async function destructionGetDetail(response) {
} }
} }
const searchCondition = await getSearchCondition(basicPatternModel?.dataObjModels[0]?.id); // ,response.id),
if (response.isShowWaitTaskDef || response.isShowHandledTaskDef) {
let optProcess = await findListTaskDefinition({
appId: response.id,
});
if(optProcess){
searchCondition.push({
key: 'taskDefKey',
name: '流程节点',
type: 'select',
options: optProcess.map((g) => {
return {
key: g.id,
name: g.name,
};
}),
});
}
}
return { return {
addFields: await translateAddFields(fileds, tableInfo), addFields: await translateAddFields(fileds, tableInfo),
tableInfo, tableInfo,
allConfigSetInfo: response, allConfigSetInfo: response,
searchCondition: await getSearchCondition(basicPatternModel?.dataObjModels[0]?.id, searchCondition,
),
// ,response.id),
// 姚鑫国改这里 // 姚鑫国改这里
}; };
} }
......
...@@ -60,6 +60,11 @@ const getColumns = (workId) => { ...@@ -60,6 +60,11 @@ const getColumns = (workId) => {
return apiRequest('/UnifiedAppFormApi/getFormTitle', { id: workId }); return apiRequest('/UnifiedAppFormApi/getFormTitle', { id: workId });
}; };
const findListTaskDefinition = (params) => {
// 获取表头 workId
return apiRequest('/UnifiedAppFormApi/findListTaskDefinition', params);
};
const getHead = (dataObjId) => { const getHead = (dataObjId) => {
// 获取表头 workId // 获取表头 workId
return apiRequest('/DataColumnApi/getHeaderList', { dataObjId }); return apiRequest('/DataColumnApi/getHeaderList', { dataObjId });
...@@ -238,4 +243,5 @@ export { ...@@ -238,4 +243,5 @@ export {
getSqlOptions, getSqlOptions,
getHead, getHead,
getGroupList, getGroupList,
findListTaskDefinition,
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论