Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
utools_web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
utools_web
Commits
027efe38
Commit
027efe38
authored
Feb 20, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jkasd
parent
a691fa1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
36 deletions
+89
-36
index.jsx
src/components/DragModal/Tagadder/index.jsx
+3
-1
QuoteList.jsx
src/pages/project/QuoteList.jsx
+86
-35
No files found.
src/components/DragModal/Tagadder/index.jsx
View file @
027efe38
...
...
@@ -38,6 +38,7 @@ const Tagadder = ({ value = [{ color: '#13c2c2', text: '123' }], onChange, max }
{
color
:
'#13c2c2'
,
text
:
inputValue
,
tag_name
:
inputValue
},
]);
}
else
{
...
...
@@ -66,6 +67,7 @@ const Tagadder = ({ value = [{ color: '#13c2c2', text: '123' }], onChange, max }
background
:
token
.
colorBgContainer
,
borderStyle
:
'dashed'
,
};
console
.
log
(
value
);
return
(
<
Space
size=
{
[
0
,
8
]
}
wrap
style=
{
{
paddingTop
:
4
,
justifyContent
:
'flex-start'
}
}
>
{
value
.
map
((
tag
,
index
)
=>
{
...
...
@@ -83,7 +85,7 @@ const Tagadder = ({ value = [{ color: '#13c2c2', text: '123' }], onChange, max }
/>
);
}
const
isLongTag
=
tag
.
text
.
length
>
20
;
const
isLongTag
=
tag
?.
text
?
.
length
>
20
;
const
tagElem
=
(
<
Tag
key=
{
tag
.
text
}
...
...
src/pages/project/QuoteList.jsx
View file @
027efe38
...
...
@@ -2,9 +2,9 @@
import
DragModal
from
'@/components/DragModal'
;
import
IconFont
from
'@/components/IconFont'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
CloseOutlined
,
PlayCircleFilled
}
from
'@ant-design/icons'
;
import
{
CloseOutlined
,
PlayCircleFilled
,
EllipsisOutlined
}
from
'@ant-design/icons'
;
import
{
useModel
}
from
'@umijs/max'
;
import
{
Avatar
,
Button
,
Empty
,
Modal
,
Popconfirm
,
Select
,
Tooltip
}
from
'antd'
;
import
{
Avatar
,
Button
,
Empty
,
Modal
,
Popconfirm
,
Select
,
T
ag
,
T
ooltip
}
from
'antd'
;
import
dayjs
from
'dayjs'
;
import
{
memo
,
useState
}
from
'react'
;
import
{
Draggable
,
Droppable
}
from
'react-beautiful-dnd'
;
...
...
@@ -55,7 +55,7 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
setInitialState
,
}
=
useModel
(
'@@initialState'
);
const
Header
=
({
userList
,
id
,
noname
,
click
})
=>
{
const
Header
=
({
userList
,
id
,
noname
,
click
,
size
})
=>
{
return
(
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
gap
:
8
}
}
>
<
Tooltip
title=
{
getUserInfo
(
userList
,
id
)?.
user_name
}
>
...
...
@@ -65,7 +65,7 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
e
.
stopPropagation
();
noname
&&
click
();
}
}
size=
"large"
size=
{
size
??
'large'
}
src=
{
getUserInfo
(
userList
,
id
)?.
head_url
}
></
Avatar
>
)
:
(
...
...
@@ -74,7 +74,7 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
e
.
stopPropagation
();
noname
&&
click
();
}
}
size=
"large"
size=
{
size
??
'large'
}
>
{
getUserInfo
(
userList
,
id
)?.
user_name
?.
charAt
(
0
)
}
</
Avatar
>
...
...
@@ -110,12 +110,33 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
}
>
<
div
style=
{
{
marginTop
:
0
}
}
>
<
Header
userList=
{
userList
}
id=
{
modal
?.
userid
}
></
Header
>
<
div
className=
"spread"
>
<
Header
size=
"small"
userList=
{
userList
}
id=
{
modal
?.
userid
}
></
Header
>
<
div
className=
"spread"
>
{
modal
?.
tags
?.
map
((
it
)
=>
{
const
isLongTag
=
it
.
tag_name
.
length
>
20
;
return
(
<
Tag
key=
{
it
?.
id
}
style=
{
{
userSelect
:
'none'
,
display
:
'flex'
,
alignItems
:
'center'
,
}
}
color=
{
it
?.
color
}
>
<
div
></
div
>
<
span
>
{
isLongTag
?
`${it.tag_name.slice(0, 20)}
...
`
:
it
.
tag_name
}
</
span
>
</
Tag
>
);
})
}
</
div
>
</
div
>
{
modal
?.
content
?
(
<
div
dangerouslySetInnerHTML=
{
{
__html
:
modal
?.
content
}
}
></
div
>
)
:
(
<
Empty
description=
{
false
}
style=
{
{
marginTop
:
-
12
,
marginBottom
:
12
}
}
></
Empty
>
<
Empty
description=
{
false
}
style=
{
{
marginTop
:
12
,
marginBottom
:
24
}
}
></
Empty
>
)
}
<
div
className=
"center"
style=
{
{
justifyContent
:
'space-between'
}
}
>
...
...
@@ -133,6 +154,7 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
deadline
:
modal
?.
deadline
,
userid
:
modal
?.
userid
,
id
:
modal
?.
id
,
tags
:
modal
?.
tags
?.
map
((
it
)
=>
it
?.
id
),
});
}
}
>
...
...
@@ -167,9 +189,39 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
deadline
:
item
?.
deadline
,
userid
:
item
?.
userid
,
id
:
item
?.
id
,
tags
:
item
?.
tags
,
}));
}
}
>
<
div
className=
"spread"
>
<
b
style=
{
{
fontSize
:
15
}
}
>
{
item
.
mission_name
}
</
b
>
{
currentUser
?.
id
===
item
.
userid
&&
(
<
Popconfirm
title=
"是否删除该任务?"
placement=
"bottomRight"
onConfirm=
{
(
e
)
=>
{
e
.
stopPropagation
();
doFetch
({
url
:
`/webtool/v1/item/${item.id}`
,
params
:
{},
method
:
'DELETE'
,
}).
then
((
res
)
=>
{
refresh
();
});
}
}
onCancel=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
>
<
CloseOutlined
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
style=
{
{
fontSize
:
12
}
}
/>
</
Popconfirm
>
)
}
</
div
>
<
div
className=
"spread"
style=
{
{
gap
:
12
}
}
>
<
Header
userList=
{
userList
}
...
...
@@ -210,34 +262,32 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
}
}
></
Header
>
<
div
style=
{
{
flex
:
1
}
}
>
<
div
className=
"center"
style=
{
{
justifyContent
:
'space-between'
}
}
>
<
b
style=
{
{
fontSize
:
15
}
}
>
{
item
.
mission_name
}
</
b
>
{
currentUser
?.
id
===
item
.
userid
&&
(
<
Popconfirm
title=
"是否删除该任务?"
placement=
"bottomRight"
onConfirm=
{
(
e
)
=>
{
e
.
stopPropagation
();
doFetch
({
url
:
`/webtool/v1/item/${item.id}`
,
params
:
{},
method
:
'DELETE'
,
}).
then
((
res
)
=>
{
refresh
();
});
}
}
onCancel=
{
(
e
)
=>
{
e
.
stopPropagation
();
<
div
className=
"center"
style=
{
{
justifyContent
:
'flex-start'
}
}
>
{
item
?.
tags
?.
filter
((
it
,
i
)
=>
i
<
3
)
.
map
((
it
)
=>
{
const
isLongTag
=
it
.
tag_name
.
length
>
6
;
return
(
<
Tag
key=
{
it
?.
id
}
style=
{
{
userSelect
:
'none'
,
display
:
'flex'
,
alignItems
:
'center'
,
}
}
color=
{
it
?.
color
}
>
<
CloseOutlined
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
style=
{
{
fontSize
:
12
}
}
/>
</
Popconfirm
>
)
}
<
div
></
div
>
<
span
>
{
isLongTag
?
`${it.tag_name.slice(0, 6)}
...
`
:
it
.
tag_name
}
</
span
>
</
Tag
>
);
})
}
{
item
.
tags
.
length
>
3
&&
<
EllipsisOutlined
/>
}
</
div
>
<
div
className=
"spread"
...
...
@@ -273,6 +323,7 @@ const QuoteList = ({ listId, datas, add, edit, userList, refresh }) => {
)
}
</
div
>
<
Button
size=
"small"
onClick=
{
async
()
=>
{
let
res
=
{};
if
(
item
.
status
===
'0'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment