Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
3e485400
提交
3e485400
authored
4月 27, 2023
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2073 开发需求1229
上级
df3994ea
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
175 行增加
和
129 行删除
+175
-129
AuditPage.js
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
+9
-2
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+15
-9
ListTab.js
FormInsertDiy/AffairPage/AuditPage/ListTab.js
+80
-72
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+71
-46
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
浏览文件 @
3e485400
...
@@ -134,7 +134,6 @@ class AuditPage extends Component {
...
@@ -134,7 +134,6 @@ class AuditPage extends Component {
},
},
beforeSearchData
:
(
data
)
=>
{
beforeSearchData
:
(
data
)
=>
{
let
searcherKeyValue
=
{};
let
searcherKeyValue
=
{};
console
.
log
(
data
);
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'
&&
item
.
key
!==
'taskDefKey'
...
@@ -178,7 +177,13 @@ class AuditPage extends Component {
...
@@ -178,7 +177,13 @@ class AuditPage extends Component {
};
};
};
};
render
()
{
componentDidMount
()
{
if
(
this
.
props
.
setRefInfo
){
this
.
props
.
setRefInfo
(
'AuditPage'
,
this
);
}
}
render
()
{
const
{
workId
,
dataBaseId
,
addFields
,
searchCondition
}
=
this
.
props
;
const
{
workId
,
dataBaseId
,
addFields
,
searchCondition
}
=
this
.
props
;
return
(
return
(
<
PageHeaderWrapper
title
=
""
>
<
PageHeaderWrapper
title
=
""
>
...
@@ -191,6 +196,8 @@ class AuditPage extends Component {
...
@@ -191,6 +196,8 @@ class AuditPage extends Component {
addFields
=
{
addFields
}
addFields
=
{
addFields
}
locationState
=
{
this
.
context
.
locationState
}
locationState
=
{
this
.
context
.
locationState
}
pageSearch
=
{
this
.
handleSearchSet
({})}
pageSearch
=
{
this
.
handleSearchSet
({})}
setRefInfo
=
{
this
.
props
.
setRefInfo
}
keepAliveData
=
{
this
.
props
.
keepAliveData
}
/
>
/
>
<
/PageHeaderWrapper
>
<
/PageHeaderWrapper
>
);
);
...
...
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
3e485400
...
@@ -11,6 +11,7 @@ import { handleColumns } from '@/webPublic/FormInsertDiy/AffairPage/destruction'
...
@@ -11,6 +11,7 @@ import { handleColumns } from '@/webPublic/FormInsertDiy/AffairPage/destruction'
export
default
class
List
extends
Component
{
export
default
class
List
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
{
keepAliveData
}
=
props
;
this
.
state
=
{
this
.
state
=
{
list
:
[],
list
:
[],
selectRows
:
[],
selectRows
:
[],
...
@@ -18,7 +19,7 @@ export default class List extends Component {
...
@@ -18,7 +19,7 @@ export default class List extends Component {
loading
:
true
,
loading
:
true
,
sortGetPageFields
:
{},
sortGetPageFields
:
{},
pagination
:
{
pagination
:
{
current
:
1
,
current
:
(
keepAliveData
&&
keepAliveData
.
pageCurrent
)
||
1
,
total
:
1
,
total
:
1
,
pageSize
:
this
.
props
.
listConfig
.
pageSize
||
10
,
pageSize
:
this
.
props
.
listConfig
.
pageSize
||
10
,
pageSizeOptions
:
[
'10'
,
'20'
,
'50'
,
'100'
,
'500'
],
pageSizeOptions
:
[
'10'
,
'20'
,
'50'
,
'100'
,
'500'
],
...
@@ -47,6 +48,12 @@ export default class List extends Component {
...
@@ -47,6 +48,12 @@ export default class List extends Component {
}
}
}
}
}
}
if
(
props
.
keepAliveData
?.
searchFormValues
)
{
formValues
=
{
...
formValues
,
...
props
.
keepAliveData
?.
searchFormValues
,
};
}
return
formValues
;
return
formValues
;
};
};
...
@@ -99,9 +106,9 @@ export default class List extends Component {
...
@@ -99,9 +106,9 @@ export default class List extends Component {
data
=
search
.
beforeSearchData
(
data
,
{
...
this
.
props
});
data
=
search
.
beforeSearchData
(
data
,
{
...
this
.
props
});
}
}
if
(
search
.
beforeSearchDataOutSide
&&
typeof
search
.
beforeSearchDataOutSide
===
'function'
)
{
if
(
search
.
beforeSearchDataOutSide
&&
typeof
search
.
beforeSearchDataOutSide
===
'function'
)
{
data
=
search
.
beforeSearchDataOutSide
(
data
,
{
...
this
.
props
});
data
=
search
.
beforeSearchDataOutSide
(
data
,
{
...
this
.
props
});
}
}
search
.
getPageService
({
...
data
,
appId
:
workId
}).
then
((
response
)
=>
{
search
.
getPageService
({
...
data
,
appId
:
workId
}).
then
((
response
)
=>
{
this
.
setState
({
this
.
setState
({
...
@@ -189,12 +196,11 @@ export default class List extends Component {
...
@@ -189,12 +196,11 @@ export default class List extends Component {
if
(
!
search
.
noNeedInitData
)
{
if
(
!
search
.
noNeedInitData
)
{
this
.
getPage
();
this
.
getPage
();
}
}
if
(
this
.
props
.
setRefInfo
)
{
this
.
props
.
setRefInfo
(
'List'
,
this
);
}
}
}
componentWillMount
()
{}
componentWillUnmount
()
{}
resetFormValues
=
()
=>
{
resetFormValues
=
()
=>
{
const
{
beforeResetFormValues
}
=
this
.
props
.
pageSearch
.
search
;
const
{
beforeResetFormValues
}
=
this
.
props
.
pageSearch
.
search
;
let
{
formValues
}
=
this
.
state
;
let
{
formValues
}
=
this
.
state
;
...
@@ -335,7 +341,7 @@ export default class List extends Component {
...
@@ -335,7 +341,7 @@ export default class List extends Component {
search
=
{
pageSearch
.
search
}
search
=
{
pageSearch
.
search
}
getPage
=
{
this
.
getPage
}
getPage
=
{
this
.
getPage
}
children
=
{
children
}
children
=
{
children
}
columns
=
{
columns
}
columns
=
{
columns
}
/
>
/
>
)
:
null
}
)
:
null
}
<
StandardTable
{...
tableProps
}
/
>
<
StandardTable
{...
tableProps
}
/
>
...
...
FormInsertDiy/AffairPage/AuditPage/ListTab.js
浏览文件 @
3e485400
...
@@ -9,84 +9,92 @@ import List from './List';
...
@@ -9,84 +9,92 @@ import List from './List';
const
TabPane
=
Tabs
.
TabPane
;
const
TabPane
=
Tabs
.
TabPane
;
class
ListTab
extends
Component
{
class
ListTab
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
{
tabList
}
=
this
.
props
;
const
{
tabList
,
keepAliveData
}
=
this
.
props
;
const
tabKeys
=
Object
.
keys
(
tabList
);
const
tabKeys
=
Object
.
keys
(
tabList
);
this
.
state
=
{
let
activeKey
=
this
.
props
.
locationState
?.
activeKey
||
tabKeys
[
0
];
activeKey
:
this
.
props
.
locationState
?.
activeKey
||
tabKeys
[
0
],
if
(
keepAliveData
&&
keepAliveData
.
activeKey
){
tabKeys
:
tabKeys
,
activeKey
=
keepAliveData
.
activeKey
;
};
}
}
this
.
state
=
{
activeKey
:
activeKey
,
tabKeys
:
tabKeys
,
};
}
handleChangeTab
=
(
activeKey
)
=>
{
handleChangeTab
=
(
activeKey
)
=>
{
this
.
setState
(
this
.
setState
(
{
{
activeKey
:
'-111111'
,
activeKey
:
'-111111'
,
},
},
()
=>
{
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
this
.
setState
({
activeKey
:
activeKey
,
activeKey
:
activeKey
,
});
});
},
30
);
},
30
);
},
},
);
);
};
};
render
()
{
componentDidMount
()
{
const
{
if
(
this
.
props
.
setRefInfo
)
{
tabList
,
this
.
props
.
setRefInfo
(
'ListTab'
,
this
);
pageSearch
,
}
pageButton
,
}
workId
,
dataBaseId
,
render
()
{
addFields
,
const
{
searchCondition
,
tabList
,
}
=
this
.
props
;
pageSearch
,
const
{
pageButton
,
activeKey
,
workId
,
tabKeys
dataBaseId
,
}
=
this
.
state
;
addFields
,
return
(
searchCondition
,
<
Fragment
>
}
=
this
.
props
;
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
const
{
activeKey
,
tabKeys
}
=
this
.
state
;
{
/*<SearchDom />*/
}
return
(
<
Tabs
activeKey
=
{
activeKey
}
className
=
{
styles
.
ListTab
}
onChange
=
{
this
.
handleChangeTab
}
>
<
Fragment
>
{
tabKeys
.
map
((
item
)
=>
{
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
return
<
TabPane
tab
=
{
tabList
[
item
].
name
}
key
=
{
item
}
/>
;
{
/*<SearchDom />*/
}
})}
<
Tabs
activeKey
=
{
activeKey
}
className
=
{
styles
.
ListTab
}
onChange
=
{
this
.
handleChangeTab
}
>
<
/Tabs
>
{
tabKeys
.
map
((
item
)
=>
{
<
/Shell
>
return
<
TabPane
tab
=
{
tabList
[
item
].
name
}
key
=
{
item
}
/>
;
{
tabKeys
.
map
((
item
)
=>
{
})}
if
(
activeKey
===
item
&&
pageSearch
[
item
])
{
<
/Tabs
>
const
search
=
pageSearch
[
item
].
search
;
<
/Shell
>
if
(
search
.
mustHaveCondition
&&
!
search
.
condition
.
length
)
{
{
tabKeys
.
map
((
item
)
=>
{
// 如果配置了 mustHaveCondition 则 必须有搜索条件才渲染页面 保证 搜索条件正常传给后台
if
(
activeKey
===
item
&&
pageSearch
[
item
])
{
return
null
;
const
search
=
pageSearch
[
item
].
search
;
}
if
(
search
.
mustHaveCondition
&&
!
search
.
condition
.
length
)
{
}
// 如果配置了 mustHaveCondition 则 必须有搜索条件才渲染页面 保证 搜索条件正常传给后台
return
activeKey
===
item
?
(
return
null
;
<
List
}
listConfig
=
{
tabList
[
item
].
listConfig
}
}
key
=
{
item
}
return
activeKey
===
item
?
(
workId
=
{
workId
}
<
List
addFields
=
{
addFields
}
listConfig
=
{
tabList
[
item
].
listConfig
}
searchCondition
=
{
searchCondition
}
key
=
{
item
}
dataBaseId
=
{
dataBaseId
}
workId
=
{
workId
}
pageSearch
=
{
pageSearch
[
item
]}
addFields
=
{
addFields
}
pageButton
=
{
pageButton
[
item
]}
searchCondition
=
{
searchCondition
}
/
>
dataBaseId
=
{
dataBaseId
}
)
:
null
;
pageSearch
=
{
pageSearch
[
item
]}
})}
pageButton
=
{
pageButton
[
item
]}
<
/Fragment
>
setRefInfo
=
{
this
.
props
.
setRefInfo
}
);
keepAliveData
=
{
this
.
props
.
keepAliveData
}
}
/
>
)
:
null
;
})}
<
/Fragment
>
);
}
}
}
ListTab
.
contextType
=
CreateC
;
ListTab
.
contextType
=
CreateC
;
ListTab
.
propTypes
=
{};
ListTab
.
propTypes
=
{};
ListTab
.
defaultProps
=
{};
ListTab
.
defaultProps
=
{};
...
...
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
3e485400
...
@@ -12,7 +12,12 @@ import * as destructionFunc from '../destruction';
...
@@ -12,7 +12,12 @@ import * as destructionFunc from '../destruction';
import
{
Link
}
from
'dva/router'
;
import
{
Link
}
from
'dva/router'
;
import
CreateC
from
'../../ExportComponent/ContextCreate'
;
import
CreateC
from
'../../ExportComponent/ContextCreate'
;
import
exportHandledInfo
from
'@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo'
;
import
exportHandledInfo
from
'@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo'
;
import
{
connect
}
from
'dva'
;
import
router
from
'umi/router'
;
@
connect
(({
keepAlive
})
=>
({
keepAlive
,
}))
class
Index
extends
React
.
Component
{
class
Index
extends
React
.
Component
{
static
defaultProps
=
{
static
defaultProps
=
{
hasBatchAudit
:
false
,
// 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志
hasBatchAudit
:
false
,
// 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志
...
@@ -36,8 +41,17 @@ class Index extends React.Component {
...
@@ -36,8 +41,17 @@ class Index extends React.Component {
allConfigSetInfo
:
{},
// 返回的数据
allConfigSetInfo
:
{},
// 返回的数据
};
};
window
.
callbackSubmitInfoZhiYong
=
undefined
;
window
.
callbackSubmitInfoZhiYong
=
undefined
;
this
.
refInfo
=
{
AuditPage
:
null
,
ListTab
:
null
,
List
:
null
,
};
}
}
setRefInfo
=
(
key
,
component
)
=>
{
this
.
refInfo
[
key
]
=
component
;
};
getFormDetail
=
(
workId
)
=>
{
getFormDetail
=
(
workId
)
=>
{
const
{
dataBaseId
}
=
this
.
state
;
const
{
dataBaseId
}
=
this
.
state
;
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
...
@@ -45,8 +59,8 @@ class Index extends React.Component {
...
@@ -45,8 +59,8 @@ class Index extends React.Component {
return
false
;
return
false
;
}
}
this
.
setState
({
this
.
setState
({
smartFormData
:
response
,
smartFormData
:
response
,
});
});
destructionFunc
.
destructionGetDetail
(
response
,
workId
).
then
((
x
)
=>
{
destructionFunc
.
destructionGetDetail
(
response
,
workId
).
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
this
.
setState
(
this
.
setState
(
...
@@ -80,22 +94,34 @@ class Index extends React.Component {
...
@@ -80,22 +94,34 @@ class Index extends React.Component {
title
:
'操作'
,
title
:
'操作'
,
fixed
:
'right'
,
fixed
:
'right'
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
return
(
const
{
refInfo
}
=
this
;
<
Link
const
{
dispatch
}
=
this
.
props
;
to
=
{{
function
goDetail
()
{
pathname
:
'./Detail'
,
const
data
=
{
state
:
{
activeKey
:
refInfo
.
ListTab
.
state
.
activeKey
||
'tab1'
,
workId
,
pageCurrent
:
refInfo
.
List
.
state
.
pagination
.
current
||
1
,
dataBaseId
,
searchFormValues
:
refInfo
.
List
.
state
.
formValues
||
{},
record
,
};
addFields
,
dispatch
({
tableInfo
,
type
:
'keepAlive/setAuditPageData'
,
showPrint
:
showPrint
||
routerConfig
.
showPrint
===
'1'
,
payload
:
{
},
path
:
window
.
location
.
href
.
split
(
'#'
)[
1
],
}}
>
value
:
data
,
{
text
||
'详情'
}
},
<
/Link
>
});
);
router
.
push
({
pathname
:
'./Detail'
,
state
:
{
workId
,
dataBaseId
,
record
,
addFields
,
tableInfo
,
showPrint
:
showPrint
||
routerConfig
.
showPrint
===
'1'
,
},
});
}
return
<
a
onClick
=
{
goDetail
}
>
{
text
||
'详情'
}
<
/a>
;
},
},
});
});
this
.
setState
({
this
.
setState
({
...
@@ -162,37 +188,35 @@ class Index extends React.Component {
...
@@ -162,37 +188,35 @@ class Index extends React.Component {
addFields
,
addFields
,
allConfigSetInfo
,
allConfigSetInfo
,
tableInfo
,
tableInfo
,
smartFormData
,
smartFormData
,
}
=
this
.
state
;
}
=
this
.
state
;
const
{
const
{
hasBatchAudit
,
hasBatchAudit
,
batchAuditButtonName
,
batchAuditButtonName
,
showPrint
,
showPrint
,
noNeedForm
,
noNeedForm
,
routerConfig
:
{
routerConfig
:
{
isExport
=
'0'
,
// 解决禅道 32898 在路由中增加配置项 如果 = '1' 表示 开启已处理数据的导出
isExport
=
'0'
,
// 解决禅道 32898 在路由中增加配置项 如果 = '1' 表示 开启已处理数据的导出
},
},
}
=
this
.
props
;
}
=
this
.
props
;
if
(
!
workId
||
!
smartFormData
)
{
if
(
!
workId
||
!
smartFormData
)
{
return
null
;
return
null
;
}
}
const
tab2Buttons
=
[];
const
tab2Buttons
=
[];
if
(
isExport
===
'1'
)
{
if
(
isExport
===
'1'
)
{
tab2Buttons
.
push
({
tab2Buttons
.
push
({
type
:
'export'
,
type
:
'export'
,
name
:
'导出'
,
name
:
'导出'
,
component
:
'Normal'
,
component
:
'Normal'
,
handleClick
:
(
selectRows
,
formValues
,
getPage
,
search
,
columns
)
=>
{
handleClick
:
(
selectRows
,
formValues
,
getPage
,
search
,
columns
)
=>
{
exportHandledInfo
({
exportHandledInfo
({
columns
,
columns
,
appId
:
workId
,
appId
:
workId
,
handled
:
'handled'
,
handled
:
'handled'
,
});
});
},
},
});
// 解决禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152
});
// 解决禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152
}
}
if
(
Array
.
isArray
(
columns
))
{
if
(
Array
.
isArray
(
columns
))
{
let
d
=
[];
let
d
=
[];
...
@@ -205,8 +229,7 @@ class Index extends React.Component {
...
@@ -205,8 +229,7 @@ class Index extends React.Component {
}
}
}
}
}
}
console
.
log
(
columns
);
return
(
return
(
<
AuditPage
<
AuditPage
hasBatchAudit
=
{
hasBatchAudit
}
hasBatchAudit
=
{
hasBatchAudit
}
workId
=
{
workId
}
workId
=
{
workId
}
...
@@ -220,6 +243,8 @@ class Index extends React.Component {
...
@@ -220,6 +243,8 @@ class Index extends React.Component {
showPrint
=
{
showPrint
}
showPrint
=
{
showPrint
}
noNeedForm
=
{
noNeedForm
}
noNeedForm
=
{
noNeedForm
}
tab2Buttons
=
{
tab2Buttons
}
tab2Buttons
=
{
tab2Buttons
}
keepAliveData
=
{
this
.
props
.
keepAlive
?.
AuditPageData
[
window
.
location
.
href
.
split
(
'#'
)[
1
]]}
setRefInfo
=
{
this
.
setRefInfo
}
/
>
/
>
);
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论