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

34123 工作情况考核审核---已处理页面,审核状态搜索不生效

上级 2eb68066
......@@ -14,10 +14,9 @@ class AuditPage extends Component {
this.state = {};
}
// componentDidMount() {
// console.log(this.context);
// }
// }
handleButtonSet = () => {
const { hasBatchAudit, batchAuditButtonName, noNeedForm, tab2Buttons = [] } = this.props;
......@@ -80,16 +79,26 @@ class AuditPage extends Component {
scroll: { x: 'max-content' },
getPageService: getWaitPage,
beforeSearchData: (data) => {
console.log(data);
console.log(data);
let searcherKeyValue = {};
for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') {
if (
typeof data[item.key] !== 'undefined' &&
item.key !== 'taskDefKey' &&
item.key !== 'process_status'
) {
searcherKeyValue[item.base52] = data[item.key];
}
}
if (searcherKeyValue && Object.keys(searcherKeyValue).length) {
data.searcherKeyValue = JSON.stringify(searcherKeyValue);
}
if (data.process_status) {
data.formStatusId = data.process_status;
delete data.process_status;
}
return data;
},
responseCallBack: (response) => {
......@@ -110,8 +119,8 @@ class AuditPage extends Component {
big: 4,
small: 4,
},
...this.context.locationState?.tab1Props?.search,
},
...this.context.locationState?.tab1Props?.search,
},
tableRowKey: 'id',
columns,
};
......@@ -125,15 +134,22 @@ class AuditPage extends Component {
},
beforeSearchData: (data) => {
let searcherKeyValue = {};
console.log(data);
for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') {
console.log(data);
for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined'
&& item.key !== 'taskDefKey'
&& item.key !== 'process_status'
) {
searcherKeyValue[item.base52] = data[item.key];
}
}
if (searcherKeyValue && Object.keys(searcherKeyValue).length) {
data.searcherKeyValue = JSON.stringify(searcherKeyValue);
}
if (data.process_status) {
data.formStatusId = data.process_status;
delete data.process_status;
}
return data;
},
condition: searchCondition.filter((g) => {
......@@ -151,11 +167,10 @@ class AuditPage extends Component {
big: 4,
small: 4,
},
...this.context.locationState?.tab2Props?.search,
...this.context.locationState?.tab2Props?.search,
},
tableRowKey: 'id',
columns,
};
return {
tab1,
......@@ -163,9 +178,9 @@ class AuditPage extends Component {
};
};
render() {
const { workId, dataBaseId, addFields, searchCondition } = this.props;
return (
render() {
const { workId, dataBaseId, addFields, searchCondition } = this.props;
return (
<PageHeaderWrapper title="">
<ListTab
tabList={pageSetting.tabList}
......@@ -174,7 +189,7 @@ class AuditPage extends Component {
dataBaseId={dataBaseId}
searchCondition={searchCondition}
addFields={addFields}
locationState={this.context.locationState}
locationState={this.context.locationState}
pageSearch={this.handleSearchSet({})}
/>
</PageHeaderWrapper>
......@@ -184,5 +199,4 @@ class AuditPage extends Component {
AuditPage.contextType = CreateC;
export default AuditPage;
......@@ -34,6 +34,41 @@ const text = [
'VARCHAR',
];
const optionsStatus = [
{
label: '未提交',
value: 'un_audit',
},
{
label: '审核中',
value: 'in_audit',
},
{
label: '已审核',
value: 'audited',
},
// { label: '已拒绝', value: 'refuse' },
{
label: '已失效',
value: 'invalid',
},
// { label: '已挂起', value: 'hang_up' },
{
label: '已终止',
value: 'termination',
},
// { label: '已驳回', value: 'reject' },
// { label: '已同意', value: 'agree' },
{
label: '重新提交',
value: 're_apply',
},
{
label: '己拒绝',
value: 'bad_audited',
},
];
const number = ['BIGINT', 'DOUBLE', 'FLOAT', 'INT', 'INTEGER', 'NUMERIC', 'SMALLINT', 'TINYINT'];
const date = ['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'];
......@@ -171,80 +206,93 @@ const getSearchCondition = async (id, appId = undefined) => {
return res.filter((x) => {
return x.isShowQuery !== false && x.isHidden === false;
});
}else{
return [];
}
} else {
return [];
}
});
// console.log(JSON.stringify(searchHeaders));
for (let item of searchHeaders) { // H:\project\one_stop_front\src\pages\AdminSystem\pages\ddl\formList\index.js
if(item.referenceObjId && item.id && item.referenceCodeName && item.referenceNameName){ //通过引用去查枚举
item.options = await service.getBatchOptions(item.id).then((res) => {
if(res && res[item.id]){
return res[item.id].filter((g) => {
return !!g.name && !!g.row_id;
}).map((y) => {
return {
key: y[item.referenceCodeName],
name: y[item.referenceNameName],
};
});
}else {
return [];
}
});
}
// console.log(JSON.stringify(searchHeaders));
for (let item of searchHeaders) {
// H:\project\one_stop_front\src\pages\AdminSystem\pages\ddl\formList\index.js
if (item.referenceObjId && item.id && item.referenceCodeName && item.referenceNameName) {
//通过引用去查枚举
item.options = await service.getBatchOptions(item.id).then((res) => {
if (res && res[item.id]) {
return res[item.id]
.filter((g) => {
return !!g.name && !!g.row_id;
})
.map((y) => {
return {
key: y[item.referenceCodeName],
name: y[item.referenceNameName],
};
});
} else {
return [];
}
});
}
if (item.isGroupQuery && item.id && (!item.options || !item.options.length)) {
if (item.isGroupQuery && item.id && (!item.options || !item.options.length)) {
// 获取下拉搜索条件的枚举项
if(item.name === 'process_status'){
/**
* 29890 活动发布管理/活动申报审核/通知活动审核,“活动名称”没有显示;筛选输入有误(103123,bdk@2022*$)
* 2022年9月26日
* 钟是志
* 可能需要修改 流程审核状态的枚举
* */
item.options = [
{
key: '0',
name: '已通过',
},
{
key: '1',
name: '已拒绝',
},
{
key: '2',
name: '已驳回',
},
{
key: '-1',
name: '审核中',
},
];
}else{
item.options = await service.getGroupList({
columnId: item.id,
appId,
}).then((res) => {
if (res && Array.isArray(res)) {
return res
.filter((x) => {
return x.value !== item.title && x.value;
})
.map((x) => {
return {
key: x.value,
name: x.value,
};
});
} else {
return [];
}
});
}
if (item.name === 'process_status') {
/**
* 29890 活动发布管理/活动申报审核/通知活动审核,“活动名称”没有显示;筛选输入有误(103123,bdk@2022*$)
* 2022年9月26日
* 可能需要修改 流程审核状态的枚举
*
* 2023-04-17 和雅职2.0的枚举 保持一致!!
* 解决禅道 34123
* */
// item.name = 'formStatusId';
item.options = optionsStatus.map((x) => {
return {
key: x.value,
name: x.label,
};
});
// item.options = [
// {
// key: '0',
// name: '已通过',
// },
// {
// key: '1',
// name: '已拒绝',
// },
// {
// key: '2',
// name: '已驳回',
// },
// {
// key: '-1',
// name: '审核中',
// },
// ];
} else {
item.options = await service
.getGroupList({
columnId: item.id,
appId,
})
.then((res) => {
if (res && Array.isArray(res)) {
return res
.filter((x) => {
return x.value !== item.title && x.value;
})
.map((x) => {
return {
key: x.value,
name: x.value,
};
});
} else {
return [];
}
});
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论