Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
17294f9c
提交
17294f9c
authored
10月 14, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
30041 学籍管理--班级信息,,,点击空白
上级
ca3a6264
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
200 行增加
和
170 行删除
+200
-170
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+200
-170
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
17294f9c
...
...
@@ -13,184 +13,214 @@ import { Link } from 'dva/router';
import
{
CreateC
}
from
'../../ExportComponent/ActiveMenuComponent'
;
class
Index
extends
React
.
Component
{
static
defaultProps
=
{
hasBatchAudit
:
false
,
// 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志
batchAuditButtonName
:
'批量审核'
,
// 如果需要批量审核 则直接用 BatchAudit.js 文件
};
static
defaultProps
=
{
hasBatchAudit
:
false
,
// 是否有批量审核按钮 默认关掉 如果有需要再在外面包一层 2020年5月6日 18:44:11 钟是志
batchAuditButtonName
:
'批量审核'
,
// 如果需要批量审核 则直接用 BatchAudit.js 文件
};
constructor
(
props
)
{
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
this
.
state
=
{
columns
:
[],
dataList
:
[],
headerInfo
:
[],
workId
:
this
.
props
.
workId
||
''
,
searchCondition
:
[],
pathname
,
dataBaseId
:
this
.
props
.
dataBaseId
||
''
,
addCondition
:
[],
addFields
:
[],
// 新增时填写的字段。
tableInfo
:
{},
// 表格配置属性
allConfigSetInfo
:
{},
// 返回的数据
};
window
.
callbackSubmitInfoZhiYong
=
undefined
;
}
constructor
(
props
)
{
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
this
.
state
=
{
columns
:
[],
dataList
:
[],
headerInfo
:
[],
workId
:
this
.
props
.
workId
||
''
,
searchCondition
:
[],
pathname
,
dataBaseId
:
this
.
props
.
dataBaseId
||
''
,
addCondition
:
[],
addFields
:
[],
// 新增时填写的字段。
tableInfo
:
{},
// 表格配置属性
allConfigSetInfo
:
{},
// 返回的数据
};
window
.
callbackSubmitInfoZhiYong
=
undefined
;
}
getFormDetail
=
(
workId
)
=>
{
const
{
dataBaseId
}
=
this
.
state
;
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
destructionFunc
.
destructionGetDetail
(
response
).
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
this
.
setState
(
{
addFields
,
tableInfo
,
searchCondition
,
allConfigSetInfo
,
},
()
=>
{
this
.
giveDetailColumns
();
},
);
});
});
};
getFormDetail
=
(
workId
)
=>
{
const
{
dataBaseId
}
=
this
.
state
;
service
.
getFormDetail
(
workId
)
.
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
destructionFunc
.
destructionGetDetail
(
response
)
.
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
,
searchCondition
}
=
x
;
this
.
setState
(
{
addFields
,
tableInfo
,
searchCondition
,
allConfigSetInfo
,
},
()
=>
{
this
.
giveDetailColumns
();
},
);
});
});
};
giveDetailColumns
=
()
=>
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
,
tableInfo
}
=
this
.
state
;
const
{
showPrint
,
routerConfig
}
=
this
.
props
;
const
process_status
=
columns
.
find
((
x
)
=>
{
return
x
.
name
===
'process_status'
;
});
if
(
process_status
&&
process_status
.
dataIndex
)
{
process_status
.
render
=
(
text
,
record
)
=>
{
return
record
.
statusName
||
record
[
process_status
.
dataIndex
];
};
}
columns
.
push
({
dataIndex
:
'operationDiy'
,
title
:
'操作'
,
fixed
:
'right'
,
render
:
(
text
,
record
)
=>
{
return
(
<
Link
to
=
{{
pathname
:
'./Detail'
,
state
:
{
workId
,
dataBaseId
,
record
,
addFields
,
tableInfo
,
showPrint
:
showPrint
||
routerConfig
.
showPrint
===
'1'
,
},
}}
>
giveDetailColumns
=
()
=>
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
,
tableInfo
}
=
this
.
state
;
const
{
showPrint
,
routerConfig
}
=
this
.
props
;
const
process_status
=
columns
.
find
((
x
)
=>
{
return
x
.
name
===
'process_status'
;
});
if
(
process_status
&&
process_status
.
dataIndex
)
{
process_status
.
render
=
(
text
,
record
)
=>
{
return
record
.
statusName
||
record
[
process_status
.
dataIndex
];
};
}
columns
.
push
({
dataIndex
:
'operationDiy'
,
title
:
'操作'
,
fixed
:
'right'
,
render
:
(
text
,
record
)
=>
{
return
(
<
Link
to
=
{{
pathname
:
'./Detail'
,
state
:
{
workId
,
dataBaseId
,
record
,
addFields
,
tableInfo
,
showPrint
:
showPrint
||
routerConfig
.
showPrint
===
'1'
,
},
}}
>
{
text
||
'详情'
}
<
/Link
>
);
},
});
this
.
setState
({
columns
,
});
};
<
/Link
>
);
},
});
this
.
setState
({
columns
,
});
};
getColumn
=
()
=>
{
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
if
(
!
response
||
!
Array
.
isArray
(
response
))
{
response
=
[];
}
// console.log('columns', response);
for
(
let
item
of
response
)
{
if
(
item
.
dataIndex
===
'taskName'
&&
!
item
.
width
)
{
item
.
width
=
150
;
// 29213 资助事务管理/国家三金/国家奖学金审核(高职),界面排版(100661,bdk@2022*$)
}
if
(
item
.
dataIndex
===
'createTime'
&&
!
item
.
width
)
{
item
.
width
=
150
;
// 29213 资助事务管理/国家三金/国家奖学金审核(高职),界面排版(100661,bdk@2022*$)
}
}
response
=
response
.
filter
((
x
)
=>
{
return
x
.
title
!==
'流程进度'
;
});
console
.
log
(
response
);
if
(
response
&&
response
.
length
)
{
this
.
setState
(
{
columns
:
response
,
// 表头
},
()
=>
{
this
.
getFormDetail
(
workId
);
},
);
}
});
};
getColumn
=
()
=>
{
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
)
.
then
((
response
)
=>
{
if
(
!
response
||
!
Array
.
isArray
(
response
))
{
response
=
[];
}
// console.log('columns', response);
for
(
let
item
of
response
)
{
if
(
item
.
dataIndex
===
'taskName'
&&
!
item
.
width
)
{
item
.
width
=
150
;
// 29213 资助事务管理/国家三金/国家奖学金审核(高职),界面排版(100661,bdk@2022*$)
}
if
(
item
.
dataIndex
===
'createTime'
&&
!
item
.
width
)
{
item
.
width
=
150
;
// 29213 资助事务管理/国家三金/国家奖学金审核(高职),界面排版(100661,bdk@2022*$)
}
}
response
=
response
.
filter
((
x
)
=>
{
return
x
.
title
!==
'流程进度'
;
});
console
.
log
(
response
);
if
(
response
&&
response
.
length
)
{
this
.
setState
(
{
columns
:
response
,
// 表头
},
()
=>
{
this
.
getFormDetail
(
workId
);
},
);
}
});
};
componentDidMount
()
{
const
{
pathname
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
if
(
workId
)
{
this
.
getColumn
();
}
else
{
service
.
getId
(
pathname
).
then
((
x
)
=>
{
this
.
setState
(
{
workId
:
x
.
workId
,
dataBaseId
:
x
.
dataBaseId
,
},
()
=>
{
this
.
getColumn
();
},
);
});
}
}
componentDidMount
()
{
const
{
pathname
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
if
(
workId
)
{
this
.
getColumn
();
}
else
{
service
.
getId
(
pathname
)
.
then
((
x
)
=>
{
this
.
setState
(
{
workId
:
x
.
workId
,
dataBaseId
:
x
.
dataBaseId
,
},
()
=>
{
this
.
getColumn
();
},
);
});
}
}
render
()
{
const
{
workId
,
dataBaseId
,
columns
,
searchCondition
,
addFields
,
allConfigSetInfo
,
tableInfo
,
}
=
this
.
state
;
const
{
hasBatchAudit
,
batchAuditButtonName
,
showPrint
,
noNeedForm
,
tab2Buttons
=
[],
}
=
this
.
props
;
if
(
!
workId
)
{
return
null
;
}
return
(
<
AuditPage
hasBatchAudit
=
{
hasBatchAudit
}
workId
=
{
workId
}
dataBaseId
=
{
dataBaseId
}
columns
=
{
columns
}
addFields
=
{
addFields
}
tableInfo
=
{
tableInfo
}
allConfigSetInfo
=
{
allConfigSetInfo
}
searchCondition
=
{
searchCondition
}
batchAuditButtonName
=
{
batchAuditButtonName
}
showPrint
=
{
showPrint
}
noNeedForm
=
{
noNeedForm
}
tab2Buttons
=
{
tab2Buttons
}
/
>
);
}
render
()
{
const
{
workId
,
dataBaseId
,
columns
,
searchCondition
,
addFields
,
allConfigSetInfo
,
tableInfo
,
}
=
this
.
state
;
const
{
hasBatchAudit
,
batchAuditButtonName
,
showPrint
,
noNeedForm
,
tab2Buttons
=
[],
}
=
this
.
props
;
if
(
!
workId
)
{
return
null
;
}
if
(
Array
.
isArray
(
columns
)){
let
d
=
[];
for
(
let
item
of
columns
)
{
if
(
item
.
dataIndex
!==
'operationDiy'
)
{
d
.
push
({
key
:
item
.
dataIndex
,
title
:
item
.
title
,
});
}
}
console
.
log
(
JSON
.
stringify
(
d
));
}
return
(
<
AuditPage
hasBatchAudit
=
{
hasBatchAudit
}
workId
=
{
workId
}
dataBaseId
=
{
dataBaseId
}
columns
=
{
columns
}
addFields
=
{
addFields
}
tableInfo
=
{
tableInfo
}
allConfigSetInfo
=
{
allConfigSetInfo
}
searchCondition
=
{
searchCondition
}
batchAuditButtonName
=
{
batchAuditButtonName
}
showPrint
=
{
showPrint
}
noNeedForm
=
{
noNeedForm
}
tab2Buttons
=
{
tab2Buttons
}
/
>
);
}
}
export
default
function
Pr
(
props
)
{
const
{
routerConfig
}
=
useContext
(
CreateC
);
return
<
Index
{...
props
}
routerConfig
=
{
routerConfig
}
/>
;
const
{
routerConfig
}
=
useContext
(
CreateC
);
return
<
Index
{...
props
}
routerConfig
=
{
routerConfig
}
/>
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论