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

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

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