Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
861e93d3
提交
861e93d3
authored
11月 16, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
流程审核页面增加带参数跳转
上级
3eeb325a
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
127 行增加
和
91 行删除
+127
-91
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+0
-1
AuditPage.js
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
+24
-8
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+10
-10
ListTab.js
FormInsertDiy/AffairPage/AuditPage/ListTab.js
+79
-64
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+3
-3
ActiveMenuComponent.js
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
+3
-4
ContextCreate.js
FormInsertDiy/ExportComponent/ContextCreate.js
+8
-0
request.js
one_stop_public/utils/request.js
+0
-1
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
861e93d3
...
...
@@ -75,7 +75,6 @@ class AffairPage extends React.Component {
getFormDetail
=
(
workId
)
=>
{
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
console
.
log
(
response
);
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
...
...
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
浏览文件 @
861e93d3
import
pageSetting
from
'./pageSetting'
;
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
,
useContext
}
from
'react'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
ListTab
from
'./ListTab'
;
import
{
getHandledPage
,
getWaitPage
}
from
'../publicApiService'
;
import
AuditModal
from
'@/webPublic/FormInsertDiy/AuditPage/BatchAudit/AuditModal'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
CreateC
from
'@/webPublic/FormInsertDiy/ExportComponent/ContextCreate'
;
export
default
class
AuditPage
extends
Component
{
class
AuditPage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
}
componentDidMount
()
{}
// componentDidMount() {
// console.log(this.context);
// }
handleButtonSet
=
()
=>
{
const
{
hasBatchAudit
,
batchAuditButtonName
,
noNeedForm
,
tab2Buttons
=
[]
}
=
this
.
props
;
...
...
@@ -76,6 +80,7 @@ export default class AuditPage extends Component {
scroll
:
{
x
:
'max-content'
},
getPageService
:
getWaitPage
,
beforeSearchData
:
(
data
)
=>
{
console
.
log
(
data
);
let
searcherKeyValue
=
{};
for
(
let
item
of
searchCondition
)
{
if
(
typeof
data
[
item
.
key
]
!==
'undefined'
&&
item
.
key
!==
'taskDefKey'
)
{
...
...
@@ -109,6 +114,7 @@ export default class AuditPage extends Component {
tableRowKey
:
'id'
,
columns
,
};
console
.
log
(
this
.
context
.
locationState
?.
tab2Props
?.
search
?.
field
);
const
tab2
=
{
search
:
{
field
:
{},
...
...
@@ -119,7 +125,8 @@ export default class AuditPage extends Component {
},
beforeSearchData
:
(
data
)
=>
{
let
searcherKeyValue
=
{};
for
(
let
item
of
searchCondition
)
{
console
.
log
(
data
);
for
(
let
item
of
searchCondition
)
{
if
(
typeof
data
[
item
.
key
]
!==
'undefined'
&&
item
.
key
!==
'taskDefKey'
)
{
searcherKeyValue
[
item
.
base52
]
=
data
[
item
.
key
];
}
...
...
@@ -144,9 +151,11 @@ export default class AuditPage extends Component {
big
:
4
,
small
:
4
,
},
...
this
.
context
.
locationState
?.
tab2Props
?.
search
,
},
tableRowKey
:
'id'
,
columns
,
};
return
{
tab1
,
...
...
@@ -154,10 +163,11 @@ export default class AuditPage extends Component {
};
};
render
()
{
const
{
workId
,
dataBaseId
,
addFields
,
searchCondition
}
=
this
.
props
;
return
(
render
()
{
const
{
workId
,
dataBaseId
,
addFields
,
searchCondition
}
=
this
.
props
;
// const { locationState } = useContext(CreateC);
// console.log(locationState);
return
(
<
PageHeaderWrapper
title
=
""
>
<
ListTab
tabList
=
{
pageSetting
.
tabList
}
...
...
@@ -166,9 +176,15 @@ export default class AuditPage extends Component {
dataBaseId
=
{
dataBaseId
}
searchCondition
=
{
searchCondition
}
addFields
=
{
addFields
}
locationState
=
{
this
.
context
.
locationState
}
pageSearch
=
{
this
.
handleSearchSet
({})}
/
>
<
/PageHeaderWrapper
>
);
}
}
AuditPage
.
contextType
=
CreateC
;
export
default
AuditPage
;
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
861e93d3
...
...
@@ -55,16 +55,16 @@ export default class List extends Component {
const
{
pagination
,
formValues
}
=
this
.
state
;
const
search
=
pageSearch
.
search
;
let
data
=
deepCopy
(
formValues
);
/** 如果配置了默认值 则 加进去 **/
for
(
let
item
in
search
.
field
)
{
let
one
=
search
.
field
[
item
];
if
(
one
.
required
&&
typeof
data
[
item
]
===
'undefined'
)
{
/**
* 存在必填项 且当前必填项没有值时 则传入. 如果必填项有值则不需要修改
* */
data
[
item
]
=
one
.
defaultValue
;
}
}
/
/ /
** 如果配置了默认值 则 加进去 **/
//
for (let item in search.field) {
//
let one = search.field[item];
//
if (one.required && typeof data[item] === 'undefined') {
//
/**
//
* 存在必填项 且当前必填项没有值时 则传入. 如果必填项有值则不需要修改
//
* */
//
data[item] = one.defaultValue;
//
}
//
}
if
(
listConfig
.
paging
)
{
// 是否分页
data
.
pageSize
=
pagination
.
pageSize
;
...
...
FormInsertDiy/AffairPage/AuditPage/ListTab.js
浏览文件 @
861e93d3
import
React
,
{
Component
,
Fragment
}
from
'react'
;
import
{
Tabs
}
from
'antd'
;
import
styles
from
'@/baseComponent/index.less'
;
import
PropTypes
from
'prop-types'
;
import
CreateC
from
'@/webPublic/FormInsertDiy/ExportComponent/ContextCreate'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
List
from
'./List'
;
const
TabPane
=
Tabs
.
TabPane
;
export
default
class
ListTab
extends
Component
{
constructor
(
props
)
{
super
(
props
);
const
{
tabList
}
=
this
.
props
;
const
tabKeys
=
Object
.
keys
(
tabList
);
this
.
state
=
{
activeKey
:
tabKeys
[
0
],
tabKeys
:
tabKeys
,
};
}
class
ListTab
extends
Component
{
constructor
(
props
)
{
super
(
props
);
const
{
tabList
}
=
this
.
props
;
const
tabKeys
=
Object
.
keys
(
tabList
);
this
.
state
=
{
activeKey
:
this
.
props
.
locationState
?.
activeKey
||
tabKeys
[
0
],
tabKeys
:
tabKeys
,
};
}
handleChangeTab
=
(
activeKey
)
=>
{
this
.
setState
(
{
activeKey
:
'-111111'
,
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
activeKey
:
activeKey
,
});
},
30
);
},
);
};
handleChangeTab
=
(
activeKey
)
=>
{
this
.
setState
(
{
activeKey
:
'-111111'
,
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
activeKey
:
activeKey
,
});
},
30
);
},
);
};
render
()
{
const
{
tabList
,
pageSearch
,
pageButton
,
workId
,
dataBaseId
,
addFields
,
searchCondition
,
}
=
this
.
props
;
const
{
activeKey
,
tabKeys
}
=
this
.
state
;
return
(
<
Fragment
>
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
{
/*<SearchDom />*/
}
<
Tabs
activeKey
=
{
activeKey
}
className
=
{
styles
.
ListTab
}
onChange
=
{
this
.
handleChangeTab
}
>
{
tabKeys
.
map
((
item
)
=>
{
return
<
TabPane
tab
=
{
tabList
[
item
].
name
}
key
=
{
item
}
/>
;
})}
<
/Tabs
>
<
/Shell
>
{
tabKeys
.
map
((
item
)
=>
{
return
activeKey
===
item
?
(
<
List
listConfig
=
{
tabList
[
item
].
listConfig
}
key
=
{
item
}
workId
=
{
workId
}
addFields
=
{
addFields
}
searchCondition
=
{
searchCondition
}
dataBaseId
=
{
dataBaseId
}
pageSearch
=
{
pageSearch
[
item
]}
pageButton
=
{
pageButton
[
item
]}
/
>
)
:
null
;
})}
<
/Fragment
>
);
}
render
()
{
const
{
tabList
,
pageSearch
,
pageButton
,
workId
,
dataBaseId
,
addFields
,
searchCondition
,
}
=
this
.
props
;
const
{
activeKey
,
tabKeys
}
=
this
.
state
;
return
(
<
Fragment
>
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
{
/*<SearchDom />*/
}
<
Tabs
activeKey
=
{
activeKey
}
className
=
{
styles
.
ListTab
}
onChange
=
{
this
.
handleChangeTab
}
>
{
tabKeys
.
map
((
item
)
=>
{
return
<
TabPane
tab
=
{
tabList
[
item
].
name
}
key
=
{
item
}
/>
;
})}
<
/Tabs
>
<
/Shell
>
{
tabKeys
.
map
((
item
)
=>
{
if
(
activeKey
===
item
&&
pageSearch
[
item
])
{
const
search
=
pageSearch
[
item
].
search
;
if
(
search
.
mustHaveCondition
&&
!
search
.
condition
.
length
)
{
// 如果配置了 mustHaveCondition 则 必须有搜索条件才渲染页面 保证 搜索条件正常传给后台
return
null
;
}
}
return
activeKey
===
item
?
(
<
List
listConfig
=
{
tabList
[
item
].
listConfig
}
key
=
{
item
}
workId
=
{
workId
}
addFields
=
{
addFields
}
searchCondition
=
{
searchCondition
}
dataBaseId
=
{
dataBaseId
}
pageSearch
=
{
pageSearch
[
item
]}
pageButton
=
{
pageButton
[
item
]}
/
>
)
:
null
;
})}
<
/Fragment
>
);
}
}
ListTab
.
propTypes
=
{};
ListTab
.
contextType
=
CreateC
;
ListTab
.
propTypes
=
{};
ListTab
.
defaultProps
=
{};
export
default
ListTab
;
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
861e93d3
...
...
@@ -10,7 +10,7 @@ import * as service from '../publicApiService';
import
AuditPage
from
'./AuditPage'
;
import
*
as
destructionFunc
from
'../destruction'
;
import
{
Link
}
from
'dva/router'
;
import
{
CreateC
}
from
'../../ExportComponent/ActiveMenuComponent
'
;
import
CreateC
from
'../../ExportComponent/ContextCreate
'
;
class
Index
extends
React
.
Component
{
static
defaultProps
=
{
...
...
@@ -134,7 +134,6 @@ class Index extends React.Component {
response
=
response
.
filter
((
x
)
=>
{
return
x
.
title
!==
'流程进度'
;
});
console
.
log
(
response
);
if
(
response
&&
response
.
length
)
{
this
.
setState
(
{
...
...
@@ -199,7 +198,7 @@ class Index extends React.Component {
});
}
}
console
.
log
(
JSON
.
stringify
(
d
));
//
console.log(JSON.stringify(d));
}
return
(
<
AuditPage
...
...
@@ -222,5 +221,6 @@ class Index extends React.Component {
export
default
function
Pr
(
props
)
{
const
{
routerConfig
}
=
useContext
(
CreateC
);
// console.log(routerConfig);
return
<
Index
{...
props
}
routerConfig
=
{
routerConfig
}
/>
;
}
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
浏览文件 @
861e93d3
...
...
@@ -17,10 +17,7 @@ import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/ex
import
ApplyMerge
from
'./ApplyMerge'
;
// merge
import
AuditMerge
from
'./AuditMerge'
;
import
CheckRecordMerge
from
'./CheckRecordMerge'
;
export
const
CreateC
=
createContext
({
routerConfig
:
{},
});
import
CreateC
from
'./ContextCreate'
;
window
.
iframeParentComponent
=
{
Modal
,
...
...
@@ -116,10 +113,12 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
default
:
break
;
}
console
.
log
(
'112233'
);
return
(
<
CreateC
.
Provider
value
=
{{
routerConfig
,
locationState
:
location
?.
state
,
}}
>
{
Res
}
<
/CreateC.Provider
>
...
...
FormInsertDiy/ExportComponent/ContextCreate.js
0 → 100644
浏览文件 @
861e93d3
import
{
createContext
}
from
'react'
;
const
CreateC
=
createContext
({
routerConfig
:
{},
locationState
:
{},
});
export
default
CreateC
;
one_stop_public/utils/request.js
浏览文件 @
861e93d3
...
...
@@ -183,7 +183,6 @@ export async function requestOrigin(url, data, options = {}){
})
.
then
(
response
=>
{
// console.log(response);
if
(
response
&&
response
.
errMsg
)
{
response
.
errMsg
=
response
.
errMsg
.
slice
(
0
,
50
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论