|
@@ -154,57 +154,13 @@ function FlowModal(props) {
|
|
|
list: seqList,
|
|
|
name: curNode?.label || itemDataList[0].FlowInfo.name,
|
|
|
};
|
|
|
- // itemDataList.forEach((itemData, idx) => {
|
|
|
- // if (idx >= obj.list.length) return;
|
|
|
- // obj.list[idx].auditor = itemData.AuthorInfo.CName;
|
|
|
- // });
|
|
|
return obj;
|
|
|
});
|
|
|
setStepsData(dataList);
|
|
|
};
|
|
|
|
|
|
- // const updateSteps = async (data, curNodeId) => {
|
|
|
- // const dataList = [];
|
|
|
- // for (let i = 0; i < data.length; i++) {
|
|
|
- // let curNode = flowDetail.nodes.find(item => item.Id == data[i].template_node_id);
|
|
|
- // console.log(curNode);
|
|
|
- // const response = await queryDingInstanceDetail({
|
|
|
- // process_instance_id: data[i].ding_instance_id, //创建表单成功返回的id
|
|
|
- // });
|
|
|
- // if (response) {
|
|
|
- // const processInstance = response.data?.process_instance;
|
|
|
- // let data = {
|
|
|
- // processCode: '',
|
|
|
- // deptId: '14169890',
|
|
|
- // tasks: [],
|
|
|
- // // userId: '16569001414345099',
|
|
|
- // // deptId: currentUser.DingDepId || getCurrentUser()?.DingDepId,
|
|
|
- // userId: currentUser.DingUserId || getCurrentUser()?.DingUserId,
|
|
|
- // formComponentValues: [],
|
|
|
- // activityId: '',
|
|
|
- // cc_userids: [],
|
|
|
- // status: 'undefined',
|
|
|
- // name: curNode?.label || '未知节点',
|
|
|
- // };
|
|
|
- // if (processInstance?.tasks && processInstance.tasks?.length > 0) {
|
|
|
- // // let item = flowDetail.nodes.find(item => item.Id == version.template_node_id);
|
|
|
- // // if (!item) return data;
|
|
|
- // const { tasks, form_component_values, cc_userids } = processInstance;
|
|
|
- // data.processCode = curNode.process_code;
|
|
|
- // data.activityId = tasks[tasks.length - 1]?.activity_id;
|
|
|
- // data.tasks = tasks || [];
|
|
|
- // data.cc_userids = cc_userids;
|
|
|
- // data.formComponentValues = form_component_values?.filter(curNode => curNode.name);
|
|
|
- // }
|
|
|
- // dataList.push(data);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // console.log(dataList);
|
|
|
- // setStepsData(dataList);
|
|
|
- // };
|
|
|
-
|
|
|
const handleChangeClick = item => {
|
|
|
- let file = isOut ? 'newList' : 'detail';
|
|
|
+ let file = isOut ? 'list' : 'detail';
|
|
|
let type = item.flow_id ? '/queryAuditRecord' : '/queryAuditExcel';
|
|
|
console.log(`${file}${type}`, item);
|
|
|
dispatch({
|
|
@@ -439,8 +395,7 @@ function FlowModal(props) {
|
|
|
resultData = data.filter(item => item.version_name.includes(inputValue));
|
|
|
break;
|
|
|
case SELECT_TYPE.TYPE:
|
|
|
- const classify = typeOptions.find(item => item.name.includes(inputValue));
|
|
|
- resultData = data.filter(item => item.classify_id == classify?.id);
|
|
|
+ resultData = data.filter(item => item.classify_id == inputValue);
|
|
|
break;
|
|
|
case SELECT_TYPE.CREATOR:
|
|
|
resultData = data.filter(item => item.AuthorInfo?.CName.includes(inputValue));
|
|
@@ -467,38 +422,53 @@ function FlowModal(props) {
|
|
|
</Col>
|
|
|
<Col span={10}>
|
|
|
<div style={{ fontSize: '16px', marginBottom: '10px' }}>清单列表</div>
|
|
|
- <div style={{ display: 'flex' }}>
|
|
|
- <Select
|
|
|
- defaultValue={selectType}
|
|
|
- style={{ width: '20%' }}
|
|
|
- onChange={value => {
|
|
|
- setSelectType(value);
|
|
|
- setInputValue('');
|
|
|
- }}
|
|
|
- >
|
|
|
- <Option value={SELECT_TYPE.NAME}>名称:</Option>
|
|
|
- <Option value={SELECT_TYPE.TYPE}>分类:</Option>
|
|
|
- <Option value={SELECT_TYPE.CREATOR}>创建人:</Option>
|
|
|
- </Select>
|
|
|
- <Input
|
|
|
- placeholder="请输入"
|
|
|
- value={inputValue}
|
|
|
- onChange={e => setInputValue(e.target.value)}
|
|
|
- />
|
|
|
- {isOut && (
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- style={{ marginLeft: '20%' }}
|
|
|
- onClick={() => setVersionVisible(true)}
|
|
|
+ <div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
|
+ <div style={{ width: '60%' }}>
|
|
|
+ <Select
|
|
|
+ defaultValue={selectType}
|
|
|
+ style={{ width: '30%' }}
|
|
|
+ onChange={value => {
|
|
|
+ setSelectType(value);
|
|
|
+ setInputValue('');
|
|
|
+ }}
|
|
|
>
|
|
|
+ <Option value={SELECT_TYPE.NAME}>名称:</Option>
|
|
|
+ <Option value={SELECT_TYPE.TYPE}>分类:</Option>
|
|
|
+ <Option value={SELECT_TYPE.CREATOR}>创建人:</Option>
|
|
|
+ </Select>
|
|
|
+ {selectType != SELECT_TYPE.TYPE && (
|
|
|
+ <Input
|
|
|
+ style={{ width: '70%' }}
|
|
|
+ placeholder="请输入"
|
|
|
+ value={inputValue}
|
|
|
+ onChange={e => setInputValue(e.target.value)}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {selectType == SELECT_TYPE.TYPE && (
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ allowClear
|
|
|
+ style={{ width: '70%' }}
|
|
|
+ placeholder="请选择分类"
|
|
|
+ options={typeOptions}
|
|
|
+ onChange={id => setInputValue(id)}
|
|
|
+ filterOption={(input, option) =>
|
|
|
+ (option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
|
+ }
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ {isOut && (
|
|
|
+ <Button type="primary" onClick={() => setVersionVisible(true)}>
|
|
|
新建清单
|
|
|
</Button>
|
|
|
)}
|
|
|
</div>
|
|
|
+
|
|
|
<div style={{ width: '100%', marginTop: '10px' }}>
|
|
|
<Table
|
|
|
columns={columns}
|
|
|
- dataSource={showData} //data
|
|
|
+ dataSource={showData}
|
|
|
loading={nodeLoading}
|
|
|
bordered={false}
|
|
|
pagination={{ position: ['none', 'none'], pageSize: 999, onChange }}
|