|
|
@@ -148,7 +148,7 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
pageNumber: page.pageNumber,
|
|
|
userId: userId,
|
|
|
typeId: typeId,
|
|
|
- projectId: projectId,
|
|
|
+ projectId: projectId?.toString(),
|
|
|
keyword: keyword,
|
|
|
})
|
|
|
const list = res.rows.map((item: any) => {
|
|
|
@@ -227,7 +227,7 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
pageNumber: page.pageNumber,
|
|
|
userId: userId,
|
|
|
typeId: typeId,
|
|
|
- projectId: projectId,
|
|
|
+ projectId: projectId?.toString(),
|
|
|
keyword: keyword,
|
|
|
})
|
|
|
setAppCount(res.data.applicationCount);
|
|
|
@@ -263,7 +263,18 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
fetchAppProType: async () => {
|
|
|
try {
|
|
|
const res = await apis.fetchTakaiAppTypeList('projectTree');
|
|
|
- const list: AppTypeList = res.data;
|
|
|
+ // const list: AppTypeList = res.data;
|
|
|
+ const list: AppTypeList = res.data?.reduce((acc: any, item: any) => {
|
|
|
+ if (item.children.length > 0) {
|
|
|
+ item.children.forEach((val: any) => {
|
|
|
+ acc.push({
|
|
|
+ label: val.label,
|
|
|
+ value: `${val.value}`,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return acc;
|
|
|
+ }, []);
|
|
|
setAppProjectList(list);
|
|
|
// const res = await apis.fetchTakaiAppTypeList('projectTree');
|
|
|
// const list = res.data.map((item: any) => {
|
|
|
@@ -665,6 +676,7 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
flexDirection: 'column',
|
|
|
justifyContent: 'center',
|
|
|
overflow: 'hidden',
|
|
|
+ maxWidth: '85%',
|
|
|
height: '100%'
|
|
|
}}>
|
|
|
<Tooltip title={item.name} placement="top">
|
|
|
@@ -677,7 +689,7 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
whiteSpace: 'nowrap',
|
|
|
// maxWidth: '200px', // 可以根据需要调整宽度
|
|
|
cursor: 'pointer'
|
|
|
- }}>
|
|
|
+ }}>
|
|
|
{item.name.length > 20 ? `${item.name.substring(0, 30)}...` : item.name}
|
|
|
</div>
|
|
|
</Tooltip>
|
|
|
@@ -749,19 +761,19 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
display: 'flex',
|
|
|
justifyContent: 'space-between',
|
|
|
alignItems: 'flex-end',
|
|
|
- marginTop: 3,
|
|
|
+ paddingTop: 3,
|
|
|
// overflow: 'auto',
|
|
|
// paddingTop: 16,
|
|
|
// height: '100%'
|
|
|
}}>
|
|
|
- <div style={{
|
|
|
- overflow: 'auto'
|
|
|
- }}>
|
|
|
+ <div style={{
|
|
|
+ overflow: 'auto'
|
|
|
+ }}>
|
|
|
{
|
|
|
(item.status === '5' || item.status === '4' || item.status === '3' || item.status === '' || item.status === null) &&
|
|
|
<>
|
|
|
{
|
|
|
- (updateFlag||userInfoAll.id===item.createBy) &&
|
|
|
+ (updateFlag || userInfoAll.id === item.createBy) &&
|
|
|
<a
|
|
|
className="action-button"
|
|
|
style={{ marginRight: 16 }}
|
|
|
@@ -773,7 +785,7 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- (deleteFlag||userInfoAll.id===item.createBy) &&
|
|
|
+ (deleteFlag || userInfoAll.id === item.createBy) &&
|
|
|
<a className='delete-button' onClick={() => {
|
|
|
Modal.confirm({
|
|
|
title: '删除',
|
|
|
@@ -812,7 +824,8 @@ const QuestionAnswerList: React.FC = () => {
|
|
|
background: 'transparent',
|
|
|
border: '1px solid #1677ff',
|
|
|
color: '#1677ff',
|
|
|
- marginLeft: createFlag && item.status === '5'||(item.status === '5' || item.status === '4' || item.status === '3' || item.status === '' || item.status === null)&&updateFlag?8:0,
|
|
|
+ marginTop: '2px',
|
|
|
+ marginLeft: createFlag && item.status === '5' || (item.status === '5' || item.status === '4' || item.status === '3' || item.status === '' || item.status === null) && updateFlag||userInfoAll.id === item.createBy ? '10px' : 0,
|
|
|
fontSize: 12,
|
|
|
}} type="primary" variant="outlined" onClick={() => { useNowAppLication(item.appId) }}>立即使用</Button>
|
|
|
</div>
|